A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.django-cms.org/en/latest/reference/extensions.html below:

Page extensions and page content extensions

Toggle table of contents sidebar

Page extensions and page content extensions Extensions
class cms.extensions.models.PageExtension(*args, **kwargs)
class cms.extensions.models.PageContentExtension(*args, **kwargs)
Admin
class cms.extensions.admin.PageExtensionAdmin(model, admin_site)
add_view(request, form_url='', extra_context=None)

Check if the page already has an extension object. If so, redirect to edit view instead.

delete_model(request, obj)

Given a model instance delete it from the database.

get_model_perms(request)

Return empty perms dict thus hiding the model from admin index.

save_model(request, obj, form, change)

Given a model instance save it to the database.

class cms.extensions.admin.PageContentExtensionAdmin(model, admin_site)
add_view(request, form_url='', extra_context=None)

Check if the page already has an extension object. If so, redirect to edit view instead.

delete_model(request, obj)

Given a model instance delete it from the database.

get_model_perms(request)

Return empty perms dict thus hiding the model from admin index.

save_model(request, obj, form, change)

Given a model instance save it to the database.

Toolbar
class cms.extensions.toolbar.ExtensionToolbar(request, toolbar, is_current_app, app_path)

Offers simplified API for providing the user access to the admin of page extensions and page content extensions through the toolbar.

get_page_content_extension_admin(page_content_obj=None)

Get the admin url for the page content extensions menu item, depending on whether a PageContentExtension instance exists for the PageContent displayed.

Return a tuple of the page content extension and the url; the extension is None if no instance exists, the url is None is no admin is registered for the extension.

get_page_extension_admin()

Get the admin url for the page extension menu item, depending on whether a PageExtension instance exists for the current page or not.

Return a tuple of the current extension and the url; the extension is None if no instance exists, the url is None is no admin is registered for the extension.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4