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, crop and upscale keys.

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, crop and upscale keys.

STORIES_META_IMAGE_SIZE = None

Easy-thumbnail alias configuration for the post meta image; it’s a dictionary with size, crop and upscale keys. 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_TYPES defined 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_TYPES defined in `django-meta settings`_.

STORIES_FB_APPID = ''

Facebook Application ID.

Default from FB_APPID defined in `django-meta settings`_.

STORIES_FB_PROFILE_ID = ''

Facebook profile ID of the post author.

Default from FB_PROFILE_ID defined in `django-meta settings`_.

STORIES_FB_PUBLISHER = ''

Facebook URL of the blog publisher.

Default from FB_PUBLISHER defined in `django-meta settings`_.

STORIES_FB_AUTHOR_URL = 'get_author_url'

Facebook profile URL of the post author.

STORIES_FB_AUTHOR = 'get_author_name'

Facebook profile URL of the post author.

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_TYPES defined in `django-meta settings`_.

STORIES_TWITTER_SITE = ''

Twitter account of the site.

Default from TWITTER_SITE defined in `django-meta settings`_.

STORIES_TWITTER_AUTHOR = 'get_author_twitter'

Twitter account of the post author.

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_TYPES defined in `django-meta settings`_.

STORIES_SCHEMAORG_AUTHOR = 'get_author_schemaorg'

Google+ account of the post author (deprecated).

STORIES_ENABLE_COMMENTS = True

Whether to enable comments by default on posts

While djangocms_stories does 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 False no abstract field is available for posts.

STORIES_USE_PLACEHOLDER = True

Post content is managed via placeholder

If False a HTMLField is provided instead.

STORIES_MULTISITE = True

Add support for multisite setup.

STORIES_AUTHOR_DEFAULT = True

Use a default if not specified:

  • 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_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 BlogConfig instance created by Auto setup.

STORIES_AUTO_NAMESPACE = 'blog'

Namespace of the BlogConfig instance 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_CURRENT_POST_IDENTIFIER = 'djangocms_postcontent_current'

Current post identifier in request.

Name of the request attribute used in djangocms_stories.cms_toolbars.BlogToolbar to 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.BlogToolbar to detect the current apphook namespace.

STORIES_ENABLE_THROUGH_TOOLBAR_MENU = False

Show djangocms-blog toolbar in any page, even when outside the blog apphooks.

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'

Name of the plugin showing the list of blog posts authors.

STORIES_AUTHOR_POSTS_LIST_PLUGIN_NAME = 'Author Blog Articles List'

Name of the plugin showing the list of posts per authors.

STORIES_TAGS_PLUGIN_NAME = 'Tags'

Name of the plugin showing the tag blog cloud.

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_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

Number of items in per tags feed.

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

get_setting(name)[source]

Get setting value from django settings with fallback to globals defaults.

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