Settings¶
Depending on what profile and which apps out of it you’re using with your
Pinax project you have a collection of options for your settings.py
at
your disposal. This listing only includes those that are supported by the
internal applications or are used in the sample project settings (excluding
those that are already described by Django’s settings reference. If you
want to know the available settings for any of the external apps, please refer
to its docoumentation.
ACCOUNT_OPEN_SIGNUP¶
Applications: | pinax.apps.signup_codes |
---|
This setting lets you configure whether the site should allow new users to register accounts if they don’t provide any kind of signup code.
BBAUTH_APP_ID¶
Applications: | pinax.apps.bbauth |
---|
This setting is used to allow auth through Yahoo!’s Browser-Based Authentication service.
BEHIND_PROXY¶
Applications: | pinax.apps.blog |
---|
If your site is behind a proxy server, set this setting accordingly so that
the users’ real IP addresses are stored when they create blog posts. When
activated the blog takes the user’s IP addresse from
request.META['HTTP_X_FORWARDED_FOR']
instead of
request.META['REMOTE_ADDR']
.
COMBINED_INBOX_COUNT_SOURCES¶
Applications: | pinax.apps.misc |
---|
With this setting you can specify a list applications that write to the users
inbox in order to get the current inbox count for the current user. In fact
you don’t specify the application but a context processor function which you
specify here. If you for example create a project based on the
social_project
template, the messages
, notification
and
friends_app
all provide information that affects the inbox count.
Such a context processor should return a dictionary with one or more entries for the additional inbox count.
EMAIL_CONFIRMATION_DAYS¶
Applications: | emailnotification (external) |
---|
This way you can configure the number of days, confirmation email should be valid. For further details please see the documentation of the application itself.
FEEDUTIL_SUMMARY_LEN¶
Applications: | feedutil (external) |
---|---|
Default: | 150 |
Number of characters used for summary-attributes in feeds.
FORCE_LOWERCASE_TAGS¶
Applications: | tagging (external) |
---|---|
Default: | False |
If set to True
all tags will first be converted to lowercase before they
are saved to the database.
LOGIN_REDIRECT_URLNAME¶
Applications: | pinax.apps.account |
---|
This setting is used by pinax.apps.account
and allows you to specify the
name of a named URL as redirection target. If it is not set,
LOGIN_REDIRECT_URL
will get used instead.
NOTIFICATION_LANGUAGE_MODULE¶
Application: | notification (external) |
---|---|
Default: | False |
This way you can specify what model holds the language selection of a specific
user – e.g. account.Account
. The model has to have a foreign key to the
the user model (user
) and also provide a language
field, which is then
used by the notification
application.
PINAX_ITEMS_PER_FEED¶
Applications: | pinax.apps.blog |
---|---|
Default: | 20 |
With this option the number of posts that should be served in the feeds generated by Pinax’ blogging application can be configured.
PINAX_ROOT¶
Application: | pinax.apps.staticfiles |
---|
Normally you shouldn’t need to change this setting. It’s a reference to where
Pinax itself is installed so that you can easily re-use for instance templates
from that location or work with the original static files like
the build_media
command does. There this settng is used to find the
media files of those internal applications used in your project, which are
then copied into one central location.
For more on this topic take a look at Media Handling.
It is also used by default in project settings for determining a template directory.
PINAX_THEME¶
Applications: | |
---|---|
Default: | "default" |
With Pinax your site can have multiple themes available. This option now
determines, which one of these should be used. In practice the value of
PINAX_THEME
becomes part of the file-paths the build_media
command is
looking for when trying to combine all your media files into one single
location. A small example:
src/pinax/media/default/pinax/images/logo.png
is a file that is specific to the “default” theme for Pinax while:
src/pinax/media/new_hotness/pinax/images/logo.png
would only be available in the “new_hotness” theme.
This setting is also used for the core templates that are provided with Pinax
by default. The default settings.py
files provided by Pinax for instance
load templates from following locations:
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), "templates"),
os.path.join(PINAX_ROOT, "templates", PINAX_THEME),
)
Note that this setting only applies to Pinax’ core media files and templates and is not used either in the internal nor the external apps by default.
RESTRUCTUREDTEXT_FILTER_SETTINGS¶
Applications: | pinax.apps.blog |
---|---|
Default: | {} |
Using this option you can pass additional settings as dictionary through the
restructuredtext
template library to the underlying
docutils.core.publish_parts
function.
SERVE_MEDIA¶
This option is used in the standard projects’ URLconf to determine, if
django.views.static.serve
should be used to serve static files. By default
this settings is bound to the DEBUG
setting in the default
settings.py
.
STATICFILES_DIRS¶
Default: | [] |
---|
This setting defines the additional locations the staticfiles
app will
traverse when looking for media files, e.g. if you use the
build_media or
resolve_media management command or
use the static file serving view.
It should be defined as a sequence of (label, path)
tuples, e.g.:
STATICFILES_DIRS = (
('pinax', os.path.join(PINAX_ROOT, 'media', PINAX_THEME)),
('my_project', os.path.join(PROJECT_ROOT, 'media')),
)
STATICFILES_PREPEND_LABEL_APPS¶
Default: | ('django.contrib.admin',) |
---|
A sequence of app paths that have the media files in <app>/media
, not in
<app>/media/<app>
, e.g. django.contrib.admin
.
STATICFILES_MEDIA_DIRNAMES¶
Default: | ('media',) |
---|
A sequence of directory names to be used when searching for media files in
installed apps, e.g. if an app has its media files in <app>/static
use:
STATICFILES_MEDIA_DIRNAMES = (
'media',
'static',
)
URCHIN_ID¶
Applications: | pinax.apps.analytics |
---|
Used by pinax.apps.analytics
as part of your account information on Google
Analytics. Based on this setting the JavaScript is generated that is then
embedded into your website to allow Google Analytics to track your traffic.
MARKUP_CHOICES¶
Applications: | pinax.apps.blog , pinax.apps.tasks |
---|---|
Default: | (('restructuredtext', u'reStructuredText'), ('textile', u'Textile'), ('markdown', u'Markdown'), ('creole', u'Creole'),) |
The actual origin of this setting is django-wikiapp which is one of the
external applications Pinax integrates. pinax.apps.blog
uses it to
determine, how a post’s content should be converted from plain text to HTML.