Views¶
View classes for displaying stories and categories.
List Views¶
PostListView¶
CategoryEntriesView¶
- class CategoryEntriesView(**kwargs)[source]¶
Bases:
BaseConfigListViewMixin,ListView- model¶
alias of
PostContent
- context_object_name = 'postcontent_list'¶
- base_template_name = 'post_list.html'¶
- view_url_name = 'djangocms_stories:posts-category'¶
- property category¶
TaggedListView¶
- class TaggedListView(**kwargs)[source]¶
Bases:
BaseConfigListViewMixin,ListView- model¶
alias of
PostContent
- context_object_name = 'postcontent_list'¶
- base_template_name = 'post_list.html'¶
- view_url_name = 'djangocms_stories:posts-tagged'¶
Detail Views¶
PostDetailView¶
- class PostDetailView(**kwargs)[source]¶
Bases:
StoriesConfigMixin,DetailView- model¶
alias of
PostContent
- context_object_name = 'post_content'¶
- base_template_name = 'post_detail.html'¶
- slug_field = 'slug'¶
- view_url_name = 'djangocms_stories:post-detail'¶
- instant_article = False¶
- get_template_names()[source]¶
Return a list of template names to be used for the request. May not be called if render_to_response() is overridden. Return a list containing
template_name, if set on the value. Otherwise, return a list containing:the contents of the
template_name_fieldfield on the object instance that the view is operating upon (if available)<app_label>/<model_name><template_name_suffix>.html
Archive Views¶
PostArchiveView¶
- class PostArchiveView(**kwargs)[source]¶
Bases:
BaseConfigListViewMixin,ListView- model¶
alias of
PostContent
- context_object_name = 'postcontent_list'¶
- base_template_name = 'post_list.html'¶
- date_field = 'date_published'¶
- allow_empty = True¶
- allow_future = True¶
- view_url_name = 'djangocms_stories:posts-archive'¶