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']
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 0x7f15c1b202e8>), ('url', <django.forms.fields.CharField object at 0x7f15c1b20080>), ('content', <django.forms.fields.CharField object at 0x7f15c1b16eb8>), ('available_from', <django.forms.fields.DateTimeField object at 0x7f15c1b200b8>), ('available_to', <django.forms.fields.DateTimeField object at 0x7f15c1b20198>), ('identifier', <django.forms.fields.CharField object at 0x7f15c1b16f60>), ('visible_in_menu', <django.forms.fields.BooleanField object at 0x7f15c1b16d30>)])
PageForm.declared_fields = OrderedDict([('available_from', <django.forms.fields.DateTimeField object at 0x7f15c1b200b8>), ('available_to', <django.forms.fields.DateTimeField object at 0x7f15c1b20198>), ('title', <django.forms.fields.CharField object at 0x7f15c1b202e8>), ('url', <django.forms.fields.CharField object at 0x7f15c1b20080>), ('content', <django.forms.fields.CharField object at 0x7f15c1b16eb8>)])
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 0x7f15c1b16e48>, <shoop.admin.utils.picotable.Column object at 0x7f15c1b16cf8>, <shoop.admin.utils.picotable.Column object at 0x7f15c1b16828>, <shoop.admin.utils.picotable.Column object at 0x7f15c1c2d080>, <shoop.admin.utils.picotable.Column object at 0x7f15c1c2d9e8>]
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_model_url(object, kind)[source]