API¶
common¶
resources¶
Base pages resources.
-
class
pyramid_pages.resources.BasePageResource(node, prefix=None, request=None, parent=None, *args, **kwargs)[source]¶ Bases:
objectBase resource tree class for pages.
View: view of resource. Attr: The view machinery defaults to using the __call__method of the view callable (or the function itself, if the view callable is a function) to obtain a response. The attr value allows you to vary the method attribute used to obtain the response. For example, if your view was a class, and the class has a method named index and you wanted to use this method instead of the class’s__call__method to return the response, you’d say attr=”index” in the view configuration for the view. This is most useful when the view definition is a class.Template: template for view of resource. -
attr= 'page_with_redirect'¶
-
children¶
-
children_qty¶
-
get_prefix()[source]¶ Each resource defined in config for pages as dict. This method returns key from config where located current resource.
-
name¶
-
slug¶
-
template= 'pyramid_pages/index.jinja2'¶
-
view¶ alias of
pyramid_pages.views.PageView
-
models¶
Models for page.
-
class
pyramid_pages.models.BaseSacrudFlatPage[source]¶ Bases:
pyramid_pages.models.SacrudOptions,pyramid_pages.models.SeoMixin,pyramid_pages.models.RedirectMixin,pyramid_pages.models.FlatPageMixinBase flat page class for
pyramid_sacrud.
-
class
pyramid_pages.models.BaseSacrudMpttPage[source]¶ Bases:
pyramid_pages.models.SacrudOptions,pyramid_pages.models.SeoMixin,pyramid_pages.models.RedirectMixin,pyramid_pages.models.MpttPageMixinBase mptt page class for
pyramid_sacrud.
-
class
pyramid_pages.models.MpttPageMixin[source]¶ Bases:
sqlalchemy_mptt.mixins.BaseNestedSets,pyramid_pages.models.PageMixin
-
class
pyramid_pages.models.PageMixin[source]¶ Bases:
object-
description= Column(None, UnicodeText(), table=None)¶
-
name= Column(None, String(), table=None, nullable=False)¶
-
slug= Column(None, SlugType(), table=None, nullable=False)¶
-
visible= Column(None, Boolean(), table=None)¶
-
-
class
pyramid_pages.models.RecursionPageMixin[source]¶ Bases:
pyramid_pages.models.PageMixinModel with single parent_id field
routes¶
Routes for pyramid_pages
views¶
Views for pages