cms.contrib.galleries package

Submodules

cms.contrib.galleries.admin module

class cms.contrib.galleries.admin.GalleriesGalleryAdmin(model, admin_site)

Bases: cms.core.admin.DisplayableAdmin

autocomplete_lookup_fields = {'generic': [['content_type', 'object_id']], 'm2m': ['sites'], 'fk': ['author']}
fieldsets = ((<django.utils.functional.__proxy__ object at 0x557edd0>, {'fields': ['title', ('status', 'mark'), ('published_date', 'expired_date')]}), (<django.utils.functional.__proxy__ object at 0x5582350>, {'fields': ['keywords']}), (<django.utils.functional.__proxy__ object at 0x5582450>, {'fields': [('login_required', 'sitemapped')]}), (<django.utils.functional.__proxy__ object at 0x5582490>, {'fields': ['slug', 'description', 'description_auto', 'author', 'sites']}), (<django.utils.functional.__proxy__ object at 0x5995d90>, {'fields': [('slideshow_active', 'slideshow_autoPlay'), ('slideshow_stretch', 'slideshow_captions'), ('slideshow_controls', 'slideshow_keyboardControls'), ('slideshow_navigation', 'slideshow_pauseOnHover'), ('slideshow_interval', 'slideshow_transitionType')]}))
fieldsets_append = {<django.utils.functional.__proxy__ object at 0x5995fd0>: (('content_type', 'object_id'),), <django.utils.functional.__proxy__ object at 0x5995ed0>: ('zip_import',)}
get_content_object(obj)
get_title(obj)
inlines = [<class 'cms.contrib.galleries.admin.GalleriesItemInline'>]
list_display = ('get_published_date', 'get_title', 'get_content_object')
list_exclude = ('sitemapped', 'keywords__keyword')
media
ordering = ('-published_date', 'title')
class cms.contrib.galleries.admin.GalleriesGalleryInline(*args, **kwargs)

Bases: cms.core.admin.OrderableInline, cms.core.admin.OwnableInline, cms.core.translations.admin.TranslationGenericStackedInline

autocomplete_lookup_fields = {'m2m': ['sites'], 'fk': ['author']}
fieldsets = ((None, {'fields': ['title', ('status', 'mark'), ('published_date', 'expired_date'), 'description', 'description_auto', 'zip_import', ('slideshow_active', 'slideshow_captions'), 'order', 'author', 'sites', 'get_images']}),)
get_images(obj)
get_queryset(request)
max_num = 25
media
model

alias of GalleriesGallery

queryset(*args, **kwargs)
raw_id_fields = ('author', 'sites')
readonly_fields = ('get_images',)
sortable_field_name = 'order'
class cms.contrib.galleries.admin.GalleriesGalleryModelstatsUserModule

Bases: cms.contrib.modelstats.modules.ModelstatsUserModule

get_objects(request)
model

alias of GalleriesGallery

class cms.contrib.galleries.admin.GalleriesItemInline(*args, **kwargs)

Bases: cms.core.translations.admin.TranslationStackedInline

fieldsets = ((None, {'fields': ['title', 'description', 'image', 'order']}),)
max_num = 250
media
model

alias of GalleriesItem

sortable_field_name = 'order'

cms.contrib.galleries.cms_initialize module

class cms.contrib.galleries.cms_initialize.CMSInitialize

Bases: cms.core.models.CMSInitializeBase

models = (<class 'cms.contrib.galleries.models.GalleriesGallery'>, <class 'cms.contrib.galleries.models.GalleriesItem'>)

cms.contrib.galleries.cms_plugin module

class cms.contrib.galleries.cms_plugin.CMSPlugin

Bases: cms.core.plugins.CMSPluginBase

admin_icon_class = 'icon-mypictures'
description = <django.utils.functional.__proxy__ object at 0x31ffad0>
description_long = <django.utils.functional.__proxy__ object at 0x31ffb10>
status = 'stable'
verbose_name = <django.utils.functional.__proxy__ object at 0x31ffb50>
version = '0.2'

cms.contrib.galleries.management module

cms.contrib.galleries.management.create_group(sender, **kwargs)

cms.contrib.galleries.managers module

class cms.contrib.galleries.managers.GalleriesManager

Bases: cms.core.managers.DisplayableManager

galleries_for_object(obj, for_user=None)

cms.contrib.galleries.models module

class cms.contrib.galleries.models.GalleriesGallery(*args, **kwargs)

Bases: cms.core.models.Orderable, cms.core.models.Displayable, cms.core.models.Ownable

Gallery

class ApiPrivate
fields = ('content_type', 'object_id', 'images', 'slideshow_active', 'slideshow_autoPlay', 'slideshow_captions', 'slideshow_controls', 'slideshow_stretch', 'slideshow_interval', 'slideshow_keyboardControls', 'slideshow_navigation', 'slideshow_pauseOnHover', 'slideshow_transitionType', 'slideshow_options')
exception GalleriesGallery.DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception GalleriesGallery.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

GalleriesGallery.SLIDESHOW_TRANSITIONTYPE_CHOICES = (('cycle', <django.utils.functional.__proxy__ object at 0x3e30f10>), ('fade', <django.utils.functional.__proxy__ object at 0x3e3a490>), ('slide', <django.utils.functional.__proxy__ object at 0x3e44790>))
GalleriesGallery.SLIDESHOW_TRANSITIONTYPE_CYCLE = 'cycle'
GalleriesGallery.SLIDESHOW_TRANSITIONTYPE_FADE = 'fade'
GalleriesGallery.SLIDESHOW_TRANSITIONTYPE_SLIDE = 'slide'
class GalleriesGallery.Settings
ADMIN_DASHBOARD_EXCLUDE = True
MEDIA_PATH = {'default': 'images'}
SCHEMA = {'default': 'ImageGallery'}
GalleriesGallery.author
GalleriesGallery.clean_fields(exclude=None)
GalleriesGallery.content_object

Provides a generic relation to any object through content-type/object-id fields.

GalleriesGallery.content_type
GalleriesGallery.created_by
GalleriesGallery.description

A descriptor used for the original translated field.

GalleriesGallery.get_absolute_url()
GalleriesGallery.get_css_classes()
GalleriesGallery.get_keywordsfield_name()
GalleriesGallery.get_mark_display(*moreargs, **morekwargs)
GalleriesGallery.get_next_by_created_date(*moreargs, **morekwargs)
GalleriesGallery.get_next_by_modified_date(*moreargs, **morekwargs)
GalleriesGallery.get_next_by_published_date(*moreargs, **morekwargs)
GalleriesGallery.get_previous_by_created_date(*moreargs, **morekwargs)
GalleriesGallery.get_previous_by_modified_date(*moreargs, **morekwargs)
GalleriesGallery.get_previous_by_published_date(*moreargs, **morekwargs)
GalleriesGallery.get_schema
GalleriesGallery.get_slideshow_transitionType_display(*moreargs, **morekwargs)
GalleriesGallery.get_status_display(*moreargs, **morekwargs)
GalleriesGallery.images
GalleriesGallery.images_all
GalleriesGallery.import_file(delete_zip_import)
GalleriesGallery.keywords

This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.

GalleriesGallery.keywords_string

A descriptor used for the original translated field.

GalleriesGallery.modified_by
GalleriesGallery.objects = <cms.core.translations.translator.NewMultilingualManager object at 0x3efa9d0>
GalleriesGallery.save(delete_zip_import=True, *args, **kwargs)

If a zip file is uploaded, extract any images from it and add them to the gallery, before removing the zip file.

GalleriesGallery.sites
GalleriesGallery.slideshow_options
GalleriesGallery.slug

A descriptor used for the original translated field.

GalleriesGallery.title

A descriptor used for the original translated field.

class cms.contrib.galleries.models.GalleriesItem(id, keywords_string, created_date, modified_date, created_by_id, modified_by_id, description, description_auto, login_required, title, slug, status, published_date, expired_date, sitemapped, mark, order, author_id, gallery_id, image)

Bases: cms.core.models.Orderable, cms.core.models.Displayable, cms.core.models.Ownable

class ApiPrivate
fields = ('gallery', 'image')
exception GalleriesItem.DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception GalleriesItem.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

class GalleriesItem.Settings
ADMIN_DASHBOARD_EXCLUDE = True
MEDIA_PATH = {'default': 'images'}
GalleriesItem.author
GalleriesItem.clean_fields(exclude=None)
GalleriesItem.created_by
GalleriesItem.description

A descriptor used for the original translated field.

GalleriesItem.gallery
GalleriesItem.get_keywordsfield_name()
GalleriesItem.get_mark_display(*moreargs, **morekwargs)
GalleriesItem.get_name()
GalleriesItem.get_next_by_created_date(*moreargs, **morekwargs)
GalleriesItem.get_next_by_modified_date(*moreargs, **morekwargs)
GalleriesItem.get_next_by_published_date(*moreargs, **morekwargs)
GalleriesItem.get_previous_by_created_date(*moreargs, **morekwargs)
GalleriesItem.get_previous_by_modified_date(*moreargs, **morekwargs)
GalleriesItem.get_previous_by_published_date(*moreargs, **morekwargs)
GalleriesItem.get_status_display(*moreargs, **morekwargs)
GalleriesItem.image

A placeholder class that provides a way to set the attribute on the model.

GalleriesItem.image_upload_to(instance)
GalleriesItem.keywords

This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.

GalleriesItem.keywords_string

A descriptor used for the original translated field.

GalleriesItem.modified_by
GalleriesItem.objects = <cms.core.translations.translator.NewMultilingualManager object at 0x4101a50>
GalleriesItem.save(*args, **kwargs)

If no title or description is given when created, create one from the file name.

GalleriesItem.sites
GalleriesItem.slug

A descriptor used for the original translated field.

GalleriesItem.title

A descriptor used for the original translated field.

cms.contrib.galleries.urls module

cms.contrib.galleries.utils module

cms.contrib.galleries.utils.upload_to(instance, filename)

cms.contrib.galleries.views module

class cms.contrib.galleries.views.GalleriesBaseView(**kwargs)

Bases: cms.core.views.GenericTemplateView

get_data(request)
class cms.contrib.galleries.views.GalleriesGalleryDetailView(**kwargs)

Bases: cms.contrib.galleries.views.GalleriesBaseView

get(request, slug)
template_name = 'galleries/item_detail.html'
class cms.contrib.galleries.views.GalleriesListView(**kwargs)

Bases: cms.contrib.galleries.views.GalleriesBaseView

get(request, page=None)
schema_main = 'ItemList'
template_name = 'galleries/item_list.html'

Module contents