Settings¶
Configuration options for djangocms-stories.
All settings are optional and have sensible defaults.
Core 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
App Configuration¶
Settings that can be configured per Stories app configuration:
- STORIES_PAGINATE_BY
Number of stories to show per page in list views.
Default:
10- STORIES_USE_ABSTRACT
Enable/disable abstract field for stories.
Default:
True- STORIES_USE_TAGS
Enable/disable tagging functionality.
Default:
True- STORIES_USE_CATEGORIES
Enable/disable category functionality.
Default:
True- STORIES_USE_RELATED
Enable/disable related posts functionality.
Default:
True
Template Settings¶
- STORIES_TEMPLATE_PREFIX
Prefix for template names, allows custom template sets.
Default:
'djangocms_stories'- STORIES_DETAIL_TEMPLATE
Template name for story detail view.
Default:
'djangocms_stories/post_detail.html'- STORIES_LIST_TEMPLATE
Template name for story list view.
Default:
'djangocms_stories/post_list.html'
SEO Settings¶
- STORIES_META_DESCRIPTION_LENGTH
Maximum length for auto-generated meta descriptions.
Default:
155- STORIES_META_TITLE_LENGTH
Maximum length for auto-generated meta titles.
Default:
60- STORIES_SITEMAP_CHANGEFREQ
Change frequency for sitemap entries.
Default:
'weekly'- STORIES_SITEMAP_PRIORITY
Priority for sitemap entries.
Default:
0.5
Feed Settings¶
- STORIES_FEED_LATEST_ITEMS
Number of items in RSS feeds.
Default:
20- STORIES_FEED_CACHE_TIMEOUT
Cache timeout for RSS feeds in seconds.
Default:
3600(1 hour)
Performance Settings¶
- STORIES_CACHE_TIMEOUT
Default cache timeout for story content.
Default:
3600(1 hour)- STORIES_MENU_CACHE_TIMEOUT
Cache timeout for menu generation.
Default:
3600(1 hour)- STORIES_RELATED_POSTS_COUNT
Number of related posts to show.
Default:
3
Advanced Settings¶
- STORIES_WORKFLOW_ENABLED
Enable advanced editorial workflow features.
Default:
False- STORIES_VERSIONING_ENABLED
Enable content versioning (requires django-cms versioning).
Default:
True- STORIES_SEARCH_ENABLED
Enable full-text search functionality.
Default:
False- STORIES_COMMENTS_ENABLED
Enable comment functionality (requires django-contrib-comments).
Default:
False
Example Configuration¶
Complete settings example:
# djangocms-stories settings
STORIES_PAGINATE_BY = 12
STORIES_USE_ABSTRACT = True
STORIES_USE_TAGS = True
STORIES_USE_CATEGORIES = True
STORIES_USE_RELATED = True
# Template customization
STORIES_TEMPLATE_PREFIX = 'my_stories'
# SEO optimization
STORIES_META_DESCRIPTION_LENGTH = 160
STORIES_SITEMAP_CHANGEFREQ = 'daily'
STORIES_SITEMAP_PRIORITY = 0.8
# Performance tuning
STORIES_CACHE_TIMEOUT = 7200 # 2 hours
STORIES_FEED_CACHE_TIMEOUT = 1800 # 30 minutes
# Advanced features
STORIES_WORKFLOW_ENABLED = True
STORIES_SEARCH_ENABLED = True