shoop.simple_cms.admin_module package

Submodules

shoop.simple_cms.admin_module.views module

class shoop.simple_cms.admin_module.views.PageForm(**kwargs)[source]

Bases: shoop.utils.multilanguage_model_form.MultiLanguageModelForm

class Meta[source]

Bases: object

model

alias of Page

fields = ['title', 'url', 'content', 'available_from', 'available_to', 'identifier', 'visible_in_menu', 'parent', 'list_children_on_page']
PageForm.clean()[source]

If title or content has been given on any language we must enforce that the other fields are also required in that language.

This is done the way it is because url is not required by default in model level.

PageForm.is_url_valid(language_code, field_name, url)[source]

Ensure URL given is unique.

Check through the pages translation model objects to make sure that the url given doesn’t already exist.

Possible failure cases: for new page: * URL already exists

for existing page: * URL (other than owned by existing page) exists * URL exists in other languages of existing page

PageForm.base_fields = OrderedDict([('title', <django.forms.fields.CharField object at 0x7f5300741dd8>), ('url', <django.forms.fields.CharField object at 0x7f5300dbb828>), ('content', <django.forms.fields.CharField object at 0x7f52ff4557b8>), ('available_from', <django.forms.fields.DateTimeField object at 0x7f5300eea630>), ('available_to', <django.forms.fields.DateTimeField object at 0x7f530110f8d0>), ('identifier', <django.forms.fields.CharField object at 0x7f53015cc668>), ('visible_in_menu', <django.forms.fields.BooleanField object at 0x7f52ff455630>), ('parent', <mptt.forms.TreeNodeChoiceField object at 0x7f5300e6df60>), ('list_children_on_page', <django.forms.fields.BooleanField object at 0x7f530011a630>)])
PageForm.declared_fields = OrderedDict([('available_from', <django.forms.fields.DateTimeField object at 0x7f5300eea630>), ('available_to', <django.forms.fields.DateTimeField object at 0x7f530110f8d0>), ('title', <django.forms.fields.CharField object at 0x7f5300741dd8>), ('url', <django.forms.fields.CharField object at 0x7f5300dbb828>), ('content', <django.forms.fields.CharField object at 0x7f52ff4557b8>)])
PageForm.media
class shoop.simple_cms.admin_module.views.PageEditView(**kwargs)[source]

Bases: shoop.admin.utils.views.CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Page

template_name = 'shoop/simple_cms/admin/edit.jinja'
form_class

alias of PageForm

context_object_name = 'page'
add_form_errors_as_messages = True
save_form(form)[source]
class shoop.simple_cms.admin_module.views.PageListView(**kwargs)[source]

Bases: shoop.admin.utils.views.PicotableListView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Page

columns = [<shoop.admin.utils.picotable.Column object at 0x7f52ff7daf60>, <shoop.admin.utils.picotable.Column object at 0x7f52ff455f98>, <shoop.admin.utils.picotable.Column object at 0x7f5300e6d4e0>, <shoop.admin.utils.picotable.Column object at 0x7f530011abe0>, <shoop.admin.utils.picotable.Column object at 0x7f52ff34b208>]
get_object_abstract(instance, item)[source]

Module contents

class shoop.simple_cms.admin_module.SimpleCMSAdminModule[source]

Bases: shoop.admin.base.AdminModule

name = <django.utils.functional.lazy.<locals>.__proxy__ object>
breadcrumbs_menu_entry = <shoop.admin.base.MenuEntry object>
get_urls()[source]
get_menu_category_icons()[source]
get_menu_entries(request)[source]
get_required_permissions()[source]
get_model_url(object, kind)[source]