django-articleappkit 0.3 documentation

Settings

Default Settings

ARTICLEAPPKIT_SETTINGS = {
    'FIELDNAMES': {},
    'UNIQUE_TOGETHER': (),
    'AUTHOR_MODEL': 'auth.User',
    'AUTHOR_FIELD_OPTIONS': {'limit_choices_to': {'is_staff': True}},
    'IMAGE_STORAGE': settings.DEFAULT_FILE_STORAGE,
    'IMAGE_UPLOAD_TO': '',
    'STATUS_CHOICES': (
        (0, u'DRAFT'),
        (1, u'PUBLISHED'),
        (2, u'UN-PUBLISHED'),
    ),
    'DEFAULT_STATUS': 0,
    'PUBLISHED_STATUS': 1,
    'UNPUBLISHED_STATUS': 2,
}

FIELDNAMES

A dict mapping the original field name to the new field name. The model uses This value as the verbose name of the model and doesn’t change the database name or the name developers must use.

You must include the underscores in the key, but should not include them in the value.

Default: {}

AUTHOR_MODEL

The model used for relations in several Attribution Mixins. The string should be in 'app.Model' format.

Default: 'auth.User'

AUTHOR_FIELD_OPTIONS

A dict passed as kwargs to several Attribution Mixins.

Default: {'limit_choices_to': {'is_staff': True}}

IMAGE_STORAGE

The Django storage engine to use to store images when using Key Image Mixins.

Default: django.conf.settings.DEFAULT_FILE_STORAGE

IMAGE_UPLOAD_TO

A string which is prefixed to the file name when using Key Image Mixins. By default, a blank string will use the name of the model.

Default: ''

UNIQUE_TOGETHER

Meant specifically for ArticleBase.slug to define its uniqueness. If using one of the Publishing Mixins, you might define UNIQUE_TOGETHER as ('pub_date', 'slug') to make the slug unique by date for date-based url schemes. If blank (default) slugs must always be unique.

Default: ''

STATUS_CHOICES

A tuple of int, string tuples defining the choices for the status field in the PubWorkflowMixin mixin.

Default:

(
    (0, u'DRAFT'),
    (1, u'PUBLISHED'),
    (2, u'UN-PUBLISHED'),
)

DEFAULT_STATUS

The key of the default status to use in the status field in the PubWorkflowMixin mixin.

Default: 0

PUBLISHED_STATUS

The key of the status that means the article is available on the site.

Default: 1

UNPUBLISHED_STATUS

The key of the status to use when moving from a published state, to an unpublished state.

Default: 2