Configuration

You can customize Django Suit behaviour by adding SUIT_CONFIG configuration variable to your Django project settings.py file.:

SUIT_CONFIG = {
    'PARAM': VALUE,
    'PARAM2': VALUE2
    ...
}

Default values are the ones specified in examples.

Full example

Configuration sample you can use as a start:

# Django Suit configuration example
SUIT_CONFIG = {
    # header
    # 'ADMIN_NAME': 'Django Suit',
    # 'HEADER_DATE_FORMAT': 'l, j. F Y',
    # 'HEADER_TIME_FORMAT': 'H:i',

    # forms
    # 'SHOW_REQUIRED_ASTERISK': True,  # Default True
    # 'CONFIRM_UNSAVED_CHANGES': True, # Default True

    # menu
    # 'SEARCH_URL': '/admin/auth/user/',
    # 'MENU_ICONS': {
    #    'sites': 'icon-leaf',
    #    'auth': 'icon-lock',
    # },
    # 'MENU_OPEN_FIRST_CHILD': True, # Default True
    # 'MENU_EXCLUDE': ('auth.group',),
    # 'MENU': (
    #     'sites',
    #     {'app': 'auth', 'icon':'icon-lock', 'models': ('user', 'group')},
    #     {'label': 'Settings', 'icon':'icon-cog', 'models': ('auth.user', 'auth.group')},
    #     {'label': 'Support', 'icon':'icon-question-sign', 'url': '/support/'},
    # ),

    # misc
    # 'LIST_PER_PAGE': 15
}

Forms

SHOW_REQUIRED_ASTERISK

Automatically adds asterisk symbol * to the end of every required field label:

SUIT_CONFIG = {
    'SHOW_REQUIRED_ASTERISK': True
}

CONFIRM_UNSAVED_CHANGES

Alert will be shown, when you’ll try to leave page, without saving changed form first:

SUIT_CONFIG = {
    'CONFIRM_UNSAVED_CHANGES': True
}

List

LIST_PER_PAGE

Set change_list view list_per_page parameter globally for whole admin. You can still override this parameter in any ModelAdmin class:

SUIT_CONFIG = {
    'LIST_PER_PAGE': 20
}