Configuration¶
Django settings¶
List of settings that can be set in project django settings.
- STORIES_VERSIONING_ENABLED = True¶
Enable versioning for stories (defaults to True) - only effective if djangocms-versioning is installed.
- STORIES_UNICODE_SLUGS = True¶
Allow unicode chars in auto-generated slugs.
- STORIES_IMAGE_THUMBNAIL_SIZE = {'crop': True, 'size': '120x120', 'upscale': False}¶
Easy-thumbnail alias configuration for the post main image when shown on the post lists; it’s a dictionary with
size,cropandupscalekeys.
- STORIES_IMAGE_FULL_SIZE = {'crop': True, 'size': '640x360', 'upscale': False}¶
Easy-thumbnail alias configuration for the post main image when shown on the post detail; it’s a dictionary with
size,cropandupscalekeys.
- STORIES_META_IMAGE_SIZE = None¶
Easy-thumbnail alias configuration for the post meta image; it’s a dictionary with
size,cropandupscalekeys. Recommended values are {“size”: (1200, 630), “crop”: True, “upscale”: False}
- STORIES_URLCONF = 'djangocms_stories.urls'¶
Standard Apphook URLConf.
- STORIES_PAGINATION = 20¶
Number of post per page.
- STORIES_LATEST_POSTS = 5¶
Default number of post in the Latest post plugin.
- STORIES_POSTS_LIST_TRUNCWORDS_COUNT = 100¶
Default number of words shown for abstract in the post list.
- STORIES_ALLOW_UNICODE_SLUGS = True¶
Typically slugs can contain unicode characters. Set to False to only allow ASCII-based slugs.
- STORIES_META_DESCRIPTION_LENGTH = 320¶
Maximum length for the Meta description field.
- STORIES_META_TITLE_LENGTH = 70¶
Maximum length for the Meta title field.
- STORIES_MENU_TYPES = (('complete', 'Categories and posts'), ('categories', 'Categories only'), ('posts', 'Posts only'), ('none', 'None'))¶
- STORIES_MENU_EMPTY_CATEGORIES = True¶
- STORIES_TYPE = 'Article'¶
Generic type for the post object.
- STORIES_TYPES = (('Article', 'Article'), ('Website', 'Website'))¶
Choices of available blog types.
Available values are defined in to
META_OBJECT_TYPESdefined in `django-meta settings`_.
- STORIES_FB_TYPE = 'Article'¶
Open Graph type for the post object.
- STORIES_FB_TYPES = (('Article', 'Article'), ('Website', 'Website'))¶
Choices of available blog types.
Available values are defined in to
META_FB_TYPESdefined in `django-meta settings`_.
- STORIES_FB_APPID = ''¶
Facebook Application ID.
Default from
FB_APPIDdefined in `django-meta settings`_.
- STORIES_FB_PROFILE_ID = ''¶
Facebook profile ID of the post author.
Default from
FB_PROFILE_IDdefined in `django-meta settings`_.
- STORIES_FB_PUBLISHER = ''¶
Facebook URL of the blog publisher.
Default from
FB_PUBLISHERdefined in `django-meta settings`_.
- STORIES_FB_AUTHOR_URL = 'get_author_url'¶
- STORIES_FB_AUTHOR = 'get_author_name'¶
- STORIES_TWITTER_TYPE = 'summary'¶
Twitter Card type for the post object.
- STORIES_TWITTER_TYPES = (('summary', 'Summary Card'), ('summary_large_image', 'Summary Card with Large Image'), ('product', 'Product'), ('photo', 'Photo'), ('player', 'Player'), ('app', 'App'))¶
Choices of available blog types for twitter.
Default from
TWITTER_TYPESdefined in `django-meta settings`_.
- STORIES_TWITTER_SITE = ''¶
Twitter account of the site.
Default from
TWITTER_SITEdefined in `django-meta settings`_.
- STORIES_TWITTER_AUTHOR = 'get_author_twitter'¶
- STORIES_SCHEMAORG_TYPE = 'Blog'¶
Schema.org type for the post object.
- STORIES_SCHEMAORG_TYPES = (('Article', 'Article'), ('Blog', 'Blog'), ('WebPage', 'Page'), ('WebSite', 'WebSite'), ('Event', 'Event'), ('Product', 'Product'), ('Place', 'Place'), ('Person', 'Person'), ('Book', 'Book'), ('LocalBusiness', 'LocalBusiness'), ('Organization', 'Organization'), ('Review', 'Review'))¶
Choices of available Schema.org types.
Default from
SCHEMAORG_TYPESdefined in `django-meta settings`_.
- STORIES_SCHEMAORG_AUTHOR = 'get_author_schemaorg'¶
- STORIES_ENABLE_COMMENTS = True¶
Whether to enable comments by default on posts
While
djangocms_storiesdoes not ship any comment system, this flag can be used to control the chosen comments framework.
- STORIES_USE_ABSTRACT = True¶
Use an abstract field for the post.
If
Falseno abstract field is available for posts.
- STORIES_USE_PLACEHOLDER = True¶
Post content is managed via placeholder
If
Falsea HTMLField is provided instead.
- STORIES_USE_RELATED = True¶
- STORIES_MULTISITE = True¶
Add support for multisite setup.
- STORIES_AUTHOR_DEFAULT = True¶
-
True: the current user is set as the default author;False: no default author is set;any other string: the user with the provided username is used;
- STORIES_ADMIN_POST_FIELDSET_FILTER = False¶
Callable function to change (add or filter) fields to fieldsets for admin post edit form.
See Filter function for more details.
- STORIES_AVAILABLE_PERMALINK_STYLES = (('full_date', 'Full date'), ('short_date', 'Year / Month'), ('category', 'Category'), ('slug', 'Just slug'))¶
Choices of permalinks styles.
- STORIES_PERMALINK_URLS = {'category': '<str:category>/<str:slug>/', 'full_date': '<int:year>/<int:month>/<int:day>/<str:slug>/', 'short_date': '<int:year>/<int:month>/<str:slug>/', 'slug': '<str:slug>/'}¶
URLConf corresponding to STORIES_AVAILABLE_PERMALINK_STYLES.
- STORIES_DEFAULT_OBJECT_NAME = 'Article'¶
Default label for Blog item (used in django CMS Wizard).
- STORIES_AUTO_SETUP = True¶
Enable the blog Auto setup feature.
- STORIES_AUTO_HOME_TITLE = 'Home'¶
Title of the home page created by Auto setup.
- STORIES_AUTO_BLOG_TITLE = 'Blog'¶
Title of the blog page created by Auto setup.
- STORIES_AUTO_APP_TITLE = 'Blog'¶
Title of the
BlogConfiginstance created by Auto setup.
- STORIES_AUTO_NAMESPACE = 'blog'¶
Namespace of the
BlogConfiginstance created by Auto setup.
- STORIES_SITEMAP_PRIORITY_DEFAULT = '0.5'¶
Default priority for sitemap items.
- STORIES_SITEMAP_CHANGEFREQ = (('always', 'always'), ('hourly', 'hourly'), ('daily', 'daily'), ('weekly', 'weekly'), ('monthly', 'monthly'), ('yearly', 'yearly'), ('never', 'never'))¶
List for available changefreqs for sitemap items.
- STORIES_SITEMAP_CHANGEFREQ_DEFAULT = 'monthly'¶
Default changefreq for sitemap items.
- STORIES_ABSTRACT_EDITOR_CONFIG = True¶
Configuration for the CKEditor of the abstract field.
See https://github.com/divio/djangocms-text-ckeditor/#customizing-htmlfield-editor for details.
- STORIES_POST_TEXT_EDITOR_CONFIG = True¶
Configuration for the CKEditor of the post content field.
See https://github.com/divio/djangocms-text-ckeditor/#customizing-htmlfield-editor for details.
- STORIES_ENABLE_SEARCH = True¶
Enable
aldryn-search(i.e.:django-haystack) indexes.
- STORIES_CURRENT_POST_IDENTIFIER = 'djangocms_postcontent_current'¶
Current post identifier in request.
Name of the request attribute used in
djangocms_stories.cms_toolbars.BlogToolbarto detect if request match a post detail.
- STORIES_CURRENT_NAMESPACE = 'djangocms_post_current_config'¶
Current post config identifier in request.
Name of the request attribute used in
djangocms_stories.cms_toolbars.BlogToolbarto detect the current apphook namespace.
- STORIES_ENABLE_THROUGH_TOOLBAR_MENU = False¶
- STORIES_PLUGIN_MODULE_NAME = 'Posts'¶
Name of the djangocms-blog plugins module (group).
- STORIES_LATEST_ENTRIES_PLUGIN_NAME = 'Latest Blog Articles'¶
Name of the plugin showing the list of latest posts.
- STORIES_LATEST_ENTRIES_PLUGIN_NAME_CACHED = 'Latest Blog Articles - Cache'¶
Name of the plugin showing the list of latest posts (cached version).
- STORIES_AUTHOR_POSTS_PLUGIN_NAME = 'Author Blog Articles'¶
- STORIES_AUTHOR_POSTS_LIST_PLUGIN_NAME = 'Author Blog Articles List'¶
- STORIES_TAGS_PLUGIN_NAME = 'Tags'¶
- STORIES_CATEGORY_PLUGIN_NAME = 'Categories'¶
Name of the plugin showing the list of blog categories.
- STORIES_ARCHIVE_PLUGIN_NAME = 'Archive'¶
Name of the plugin showing the blog archive index.
- STORIES_FEATURED_POSTS_PLUGIN_NAME = 'Featured Posts'¶
Name of the plugin showing the selected posts.
- STORIES_FEATURED_POSTS_PLUGIN_NAME_CACHED = 'Featured Posts - Cache'¶
Name of the plugin showing the selected posts (cached version).
- STORIES_FEED_CACHE_TIMEOUT = 3600¶
Cache timeout for RSS feeds.
- STORIES_FEED_INSTANT_ITEMS = 50¶
Number of items in Instant Article feed.
- STORIES_FEED_LATEST_ITEMS = 10¶
Number of items in latest items feed.
- STORIES_FEED_TAGS_ITEMS = 10¶
- STORIES_PLUGIN_TEMPLATE_FOLDERS = (('plugins', 'Default template'),)¶
(Sub-)folder from which the plugin templates are loaded.
The default folder is
plugins.See Plugin Templates for more details.
- STORIES_USE_FALLBACK_LANGUAGE_IN_URL = False¶
When displaying URL, prefer URL in the fallback language if an article or category is not available in the current language.
- STORIES_WIZARD_CONTENT_PLUGIN = 'TextPlugin'¶
Name of the plugin created by wizard for the text content.
- STORIES_WIZARD_CONTENT_PLUGIN_BODY = 'body'¶
Name of the plugin field to add wizard text.
- params = {'STORIES_ABSTRACT_EDITOR_CONFIG': True, 'STORIES_ADMIN_POST_FIELDSET_FILTER': False, 'STORIES_ALLOW_UNICODE_SLUGS': True, 'STORIES_ARCHIVE_PLUGIN_NAME': 'Archive', 'STORIES_AUTHOR_DEFAULT': True, 'STORIES_AUTHOR_POSTS_LIST_PLUGIN_NAME': 'Author Blog Articles List', 'STORIES_AUTHOR_POSTS_PLUGIN_NAME': 'Author Blog Articles', 'STORIES_AUTO_APP_TITLE': 'Blog', 'STORIES_AUTO_BLOG_TITLE': 'Blog', 'STORIES_AUTO_HOME_TITLE': 'Home', 'STORIES_AUTO_NAMESPACE': 'blog', 'STORIES_AUTO_SETUP': True, 'STORIES_AVAILABLE_PERMALINK_STYLES': (('full_date', 'Full date'), ('short_date', 'Year / Month'), ('category', 'Category'), ('slug', 'Just slug')), 'STORIES_CATEGORY_PLUGIN_NAME': 'Categories', 'STORIES_CURRENT_NAMESPACE': 'djangocms_post_current_config', 'STORIES_CURRENT_POST_IDENTIFIER': 'djangocms_postcontent_current', 'STORIES_DEFAULT_OBJECT_NAME': 'Article', 'STORIES_ENABLE_COMMENTS': True, 'STORIES_ENABLE_SEARCH': True, 'STORIES_ENABLE_THROUGH_TOOLBAR_MENU': False, 'STORIES_FB_APPID': '', 'STORIES_FB_AUTHOR': 'get_author_name', 'STORIES_FB_AUTHOR_URL': 'get_author_url', 'STORIES_FB_PROFILE_ID': '', 'STORIES_FB_PUBLISHER': '', 'STORIES_FB_TYPE': 'Article', 'STORIES_FB_TYPES': (('Article', 'Article'), ('Website', 'Website')), 'STORIES_FEATURED_POSTS_PLUGIN_NAME': 'Featured Posts', 'STORIES_FEATURED_POSTS_PLUGIN_NAME_CACHED': 'Featured Posts - Cache', 'STORIES_FEED_CACHE_TIMEOUT': 3600, 'STORIES_FEED_INSTANT_ITEMS': 50, 'STORIES_FEED_LATEST_ITEMS': 10, 'STORIES_FEED_TAGS_ITEMS': 10, 'STORIES_IMAGE_FULL_SIZE': {'crop': True, 'size': '640x360', 'upscale': False}, 'STORIES_IMAGE_THUMBNAIL_SIZE': {'crop': True, 'size': '120x120', 'upscale': False}, 'STORIES_LATEST_ENTRIES_PLUGIN_NAME': 'Latest Blog Articles', 'STORIES_LATEST_ENTRIES_PLUGIN_NAME_CACHED': 'Latest Blog Articles - Cache', 'STORIES_LATEST_POSTS': 5, 'STORIES_MENU_EMPTY_CATEGORIES': True, 'STORIES_MENU_TYPES': (('complete', 'Categories and posts'), ('categories', 'Categories only'), ('posts', 'Posts only'), ('none', 'None')), 'STORIES_META_DESCRIPTION_LENGTH': 320, 'STORIES_META_IMAGE_SIZE': None, 'STORIES_META_TITLE_LENGTH': 70, 'STORIES_MULTISITE': True, 'STORIES_PAGINATION': 20, 'STORIES_PERMALINK_URLS': {'category': '<str:category>/<str:slug>/', 'full_date': '<int:year>/<int:month>/<int:day>/<str:slug>/', 'short_date': '<int:year>/<int:month>/<str:slug>/', 'slug': '<str:slug>/'}, 'STORIES_PLUGIN_MODULE_NAME': 'Posts', 'STORIES_PLUGIN_TEMPLATE_FOLDERS': (('plugins', 'Default template'),), 'STORIES_POSTS_LIST_TRUNCWORDS_COUNT': 100, 'STORIES_POST_TEXT_EDITOR_CONFIG': True, 'STORIES_SCHEMAORG_AUTHOR': 'get_author_schemaorg', 'STORIES_SCHEMAORG_TYPE': 'Blog', 'STORIES_SCHEMAORG_TYPES': (('Article', 'Article'), ('Blog', 'Blog'), ('WebPage', 'Page'), ('WebSite', 'WebSite'), ('Event', 'Event'), ('Product', 'Product'), ('Place', 'Place'), ('Person', 'Person'), ('Book', 'Book'), ('LocalBusiness', 'LocalBusiness'), ('Organization', 'Organization'), ('Review', 'Review')), 'STORIES_SITEMAP_CHANGEFREQ': (('always', 'always'), ('hourly', 'hourly'), ('daily', 'daily'), ('weekly', 'weekly'), ('monthly', 'monthly'), ('yearly', 'yearly'), ('never', 'never')), 'STORIES_SITEMAP_CHANGEFREQ_DEFAULT': 'monthly', 'STORIES_SITEMAP_PRIORITY_DEFAULT': '0.5', 'STORIES_TAGS_PLUGIN_NAME': 'Tags', 'STORIES_TWITTER_AUTHOR': 'get_author_twitter', 'STORIES_TWITTER_SITE': '', 'STORIES_TWITTER_TYPE': 'summary', 'STORIES_TWITTER_TYPES': (('summary', 'Summary Card'), ('summary_large_image', 'Summary Card with Large Image'), ('product', 'Product'), ('photo', 'Photo'), ('player', 'Player'), ('app', 'App')), 'STORIES_TYPE': 'Article', 'STORIES_TYPES': (('Article', 'Article'), ('Website', 'Website')), 'STORIES_UNICODE_SLUGS': True, 'STORIES_URLCONF': 'djangocms_stories.urls', 'STORIES_USE_ABSTRACT': True, 'STORIES_USE_FALLBACK_LANGUAGE_IN_URL': False, 'STORIES_USE_PLACEHOLDER': True, 'STORIES_USE_RELATED': True, 'STORIES_VERSIONING_ENABLED': True, 'STORIES_WIZARD_CONTENT_PLUGIN': 'TextPlugin', 'STORIES_WIZARD_CONTENT_PLUGIN_BODY': 'body'}¶
//github.com/nephila/django-meta#settings
- Type:
- Type:
https
Per-apphook settings¶
- class StoriesConfig(*args, **kwargs)[source]¶
Class representing a stories configuration.
This class inherits from TranslatableModel.
- type¶
Represents the type of the stories config.
- Type:
models.CharField
- namespace¶
Represents the namespace of the instance.
- Type:
models.CharField
- translations¶
Represents the translated fields of the stories config.
- Type:
TranslatedFields
- default_image_full¶
Represents the default size of full images.
- Type:
models.ForeignKey
- default_image_thumbnail¶
Represents the default size of thumbnail images.
- Type:
models.ForeignKey
- url_patterns¶
Represents the structure of permalinks.
- Type:
models.CharField
- use_placeholder¶
Represents whether to use placeholder and plugins for article body.
- Type:
models.BooleanField
- use_abstract¶
Represents whether to use abstract field.
- Type:
models.BooleanField
Represents whether to enable related posts.
- Type:
models.SmallIntegerField
- urlconf¶
Represents the URL config.
- Type:
models.CharField
- set_author¶
Represents whether to set author by default.
- Type:
models.BooleanField
- paginate_by¶
Represents the number of articles per page for pagination.
- Type:
models.SmallIntegerField
- template_prefix¶
Represents the alternative directory to load the stories templates from.
- Type:
models.CharField
Represents the menu structure.
- Type:
models.CharField
Represents whether to show empty categories in menu.
- Type:
models.BooleanField
- sitemap_changefreq¶
Represents the changefreq attribute for sitemap items.
- Type:
models.CharField
- sitemap_priority¶
Represents the priority attribute for sitemap items.
- Type:
models.DecimalField
- object_type¶
Represents the object type.
- Type:
models.CharField
- og_type¶
Represents the Facebook type.
- Type:
models.CharField
- og_app_id¶
Represents the Facebook application ID.
- Type:
models.CharField
- og_profile_id¶
Represents the Facebook profile ID.
- Type:
models.CharField
- og_publisher¶
Represents the Facebook page URL.
- Type:
models.CharField
- og_author_url¶
Represents the Facebook author URL.
- Type:
models.CharField
- og_author¶
Represents the Facebook author.
- Type:
models.CharField
- twitter_type¶
Represents the Twitter type field.
- Type:
models.CharField
- twitter_site¶
Represents the Twitter site handle.
- Type:
models.CharField
- twitter_author¶
Represents the Twitter author handle.
- Type:
models.CharField
- gplus_type¶
Represents the Schema.org object type.
- Type:
models.CharField
- gplus_author¶
Represents the Schema.org author name abstract field.
- Type:
models.CharField
- type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- namespace¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- translations¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- default_image_full¶
Default size of full images
- default_image_thumbnail¶
Default size of thumbnail images
- url_patterns¶
Structure of permalinks (get_absolute_url); see AVAILABLE_PERMALINK_STYLES
- use_placeholder¶
-
- Type:
Use placeholder and plugins for article body (default
- use_abstract¶
-
- Type:
Use abstract field (default
- use_related¶
-
- Type:
Enable related posts (default
- set_author¶
-
- Type:
Set author by default (default
- paginate_by¶
-
- Type:
When paginating list views, how many articles per page? (default
- template_prefix¶
“”)
- Type:
Alternative directory to load the stories templates from (default
- menu_structure¶
MENU_TYPE_COMPLETE, see MENU_TYPES)- Type:
Menu structure (default
- menu_empty_categories¶
-
- Type:
Show empty categories in menu (default
- sitemap_changefreq¶
SITEMAP_CHANGEFREQ_DEFAULT, see: SITEMAP_CHANGEFREQ)
- Type:
Sitemap changefreq (default
- sitemap_priority¶
-
- Type:
Sitemap priority (default
- og_app_id¶
-
- Type:
Facebook application ID (default
- og_profile_id¶
-
- Type:
Facebook profile ID (default
- og_publisher¶
-
- Type:
Facebook page URL (default
- og_author_url¶
-
- Type:
Facebook author URL (default
- twitter_type¶
-
- Type:
Twitter type field (default
- twitter_site¶
-
- Type:
Twitter site handle (default
- twitter_author¶
-
- Type:
Twitter author handle (default
- gplus_type¶
-
- Type:
Schema.org object type (default
- gplus_author¶
-
- Type:
Schema.org author name abstract field (default
- send_knock_create¶
Send notifications on post update. Requires channels integration
- send_knock_update¶
Send notifications on post update. Requires channels integration
- property schemaorg_type¶
Compatibility shim to fetch data from legacy gplus_type field.
- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- _meta = <Options for StoriesConfig>¶
- _parler_meta: ParlerOptions = <ParlerOptions: StoriesConfig.translations to StoriesConfigTranslation>¶
Access to the metadata of the translatable model :type: ParlerOptions
- app_title¶
Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
- authorentriesplugin_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- default_image_full_id¶
- default_image_thumbnail_id¶
- featuredpostsplugin_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- genericblogplugin_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- latestpostsplugin_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- object_name¶
Descriptor for translated attributes.
This attribute proxies all get/set calls to the translated model.
- post_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- postcategory_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.