Zinnia has a lot of parameters to configure the application accordingly to
your needs. Knowing this list of settings can save you a lot of time.
Here’s a full list of all available settings, and their default values.
ZINNIA_ENTRY_BASE_MODEL
Default value: 'zinnia.models_bases.entry.AbstractEntry'
(Empty string)
String defining the base model path for the Entry model. See
Extending Entry model for more informations.
ZINNIA_ENTRY_DETAIL_TEMPLATES
Default value: ()
(Empty tuple)
List of tuple for extending the list of templates availables for
rendering the entry detail view. By using this setting, you can
change the look and feel of an entry page directly in the admin
interface. Example:
ZINNIA_ENTRY_DETAIL_TEMPLATES = (('entry_detail_alternate.html',
gettext('Alternative template')),)
ZINNIA_ENTRY_CONTENT_TEMPLATES
Default value: ()
(Empty tuple)
List of tuple for extending the list of templates availables for
rendering the content of an entry. By using this setting, you can
change the look and feel of an entry directly in the admin
interface. Example:
ZINNIA_ENTRY_CONTENT_TEMPLATES = (('zinnia/_entry_detail_alternate.html',
gettext('Alternative template')),)
ZINNIA_UPLOAD_TO
Default value: 'uploads/zinnia'
String setting that tells Zinnia where to upload entries’ images.
Previously the default value was 'uploads'
.
ZINNIA_MARKUP_LANGUAGE
Default value: 'html'
String determining the markup language used for writing the entries.
You can use one of these values:
['html', 'markdown', 'restructuredtext', 'textile']
The value of this variable will alter the value of ZINNIA_WYSIWYG
if you don’t set it.
ZINNIA_MARKDOWN_EXTENSIONS
Default value: ''
(Empty string)
Extensions names coma separated to be used for rendering the entries in
MarkDown. Example:
ZINNIA_MARKDOWN_EXTENSIONS = 'extension1_name,extension2_name...'
ZINNIA_RESTRUCTUREDTEXT_SETTINGS
Default value: {}
(Empty dict)
A dictionary containing settings for the RestructuredText markup
processing. See the Docutils restructuredtext writer settings docs
for details.
ZINNIA_WYSIWYG
Default value:
WYSIWYG_MARKUP_MAPPING = {
'textile': 'markitup',
'markdown': 'markitup',
'restructuredtext': 'markitup',
'html': 'tinymce' in settings.INSTALLED_APPS and \
'tinymce' or 'wymeditor'}
WYSIWYG = getattr(settings, 'ZINNIA_WYSIWYG',
WYSIWYG_MARKUP_MAPPING.get(ZINNIA_MARKUP_LANGUAGE))
Determining the WYSIWYG editor used for editing an entry.
So if MarkDown, Textile or reStructuredText are used, the value will be
'markitup'
, but if you use HTML, TinyMCE will be used if
django-tinymce is installed, else WYMEditor will be
used.
This setting can also be used for disabling the WYSIWYG
functionnality. Example:
ZINNIA_PREVIEW_SPLITTERS
Default value: ['<!-- more -->', '<!--more-->'])
List of split markers used to make a preview of the entry’s content if
present in the HTML. All the content before the marker will be used to
build the preview of the entry.
ZINNIA_PREVIEW_MAX_WORDS
Default value: 55
Number of words used to build the entry’s preview if no split markers are
found.
ZINNIA_PREVIEW_MORE_STRING
Default value: ' ...'
The string to be appended to the content when a truncation for the preview
is done.
ZINNIA_TRANSLATED_URLS
Default value: False
Boolean used to activate the internationalization of the URLs provided by
Zinnia if the translation is avaialable in your language.
ZINNIA_URL_SHORTENER_BACKEND
Default value: 'zinnia.url_shortener.backends.default'
String representing the module path to the URL shortener backend.
ZINNIA_PROTOCOL
Default value: 'http'
String representing the protocol of the site. If your Web site uses HTTPS,
set this setting to https
.
ZINNIA_AUTO_CLOSE_PINGBACKS_AFTER
Default value: None
(forever)
Determine the number of days where pingbacks are open. If you set this
setting to 10
the pingbacks will be closed automaticaly 10 days after
the publication date of your entries.
0
means disabling pingbacks completely.
ZINNIA_AUTO_CLOSE_TRACKBACKS_AFTER
Default value: None
(forever)
Determine the number of days where trackbacks are open. If you set this
setting to 10
the trackbacks will be closed automaticaly 10 days after
the publication date of your entries.
0
means disabling trackbacks completely.
ZINNIA_PING_DIRECTORIES
Default value: ('http://django-blog-zinnia.com/xmlrpc/',)
List of the directories you want to ping.
ZINNIA_PING_EXTERNAL_URLS
Default value: True
Boolean setting for telling if you want to ping external URLs when saving
an entry.
ZINNIA_SAVE_PING_DIRECTORIES
Default value: bool(ZINNIA_PING_DIRECTORIES)
Boolean setting for telling if you want to ping directories when saving
an entry.
ZINNIA_PINGBACK_CONTENT_LENGTH
Default value: 300
Size of the excerpt generated on pingback.