Skip to main content

Django admin theme based adminlte & bootstrap

Project description

Django jazzmin (Jazzy Admin)

Drop-in theme for django admin, that utilises AdminLTE & Bootstrap to make yo’ admin looky jazzy

This was initially a Fork of https://github.com/wuyue92tree/django-adminlte-ui that I refactored so much I thought it deserved its own package, big thanks to @wuyue92tree for all of his initial hard work, I am still patching into that project were possible, but this project is taking a slightly different direction.

Installation

pip install django-jazzmin

Setup & configuration

See the test_app (https://github.com/farridav/django-jazzmin/tests/test_app/settings.py) for a full implementation

# settings.py

INSTALLED_APPS = [
    # Place before admin
    'jazzmin',
    'django.contrib.admin',
    [...]
]


JAZZMIN_SETTINGS = {
    # title of the window
    'site_title': 'Polls Admin',

    # Title on the login screen
    'site_header': 'Polls',

    # square logo to use for your site, must be present in static files, used for favicon and brand on top left
    'site_logo': None,

    # Welcome text on the login screen
    'welcome_sign': 'Welcome to polls',

    # Copyright on the footer
    'copyright': 'Acme Ltd',

    # The model admin to search from the search bar, search bar omitted if excluded
    'search_model': 'auth.User',

    # Field name on user model that contains avatar image
    'user_avatar': None,

    # Links to put along the top menu
    'topmenu_links': [

        # Url that gets reversed (Permissions can be added)
        {'name': 'Home', 'url': 'admin:index', 'permissions': ['auth.view_user']},

        # external url that opens in a new window (Permissions can be added)
        {'name': 'Support', 'url': 'https://github.com/farridav/django-jazzmin/issues', 'new_window': True},

        # model admin to link to (Permissions checked against model)
        {'model': 'auth.User'},

        # App with dropdown menu to all its models pages (Permissions checked against models)
        {'app': 'polls'},
    ],

    # Whether to display the side menu
    'show_sidebar': True,

    # Whether to aut expand the menu
    'navigation_expanded': True,

    # Hide these apps when generating side menu
    'hide_apps': [],

    # Hide these models when generating side menu
    'hide_models': [],

    # List of apps to base side menu ordering off of
    'order_with_respect_to': ['accounts', 'polls'],

    # Custom links to append to app groups, keyed on app name
    'custom_links': {
        'polls': [{
            'name': 'Make Messages', 'url': 'make_messages', 'icon': 'fa-comments',
            'permissions': ['polls.view_polls']
        }]
    },

    # Custom icons per model in the side menu See https://www.fontawesomecheatsheet.com/font-awesome-cheatsheet-5x/
    # for a list of icon classes
    'icons': {
        'auth.user': 'fa-user',
    }
}

Screenshots

See https://github.com/farridav/django-jazzmin

Thanks

This was initially a Fork of https://github.com/wuyue92tree/django-adminlte-ui that we refactored so much we thought it deserved its own package, big thanks to @wuyue92tree for all of his initial hard work, we are still patching into that project were possible, but this project is taking a slightly different direction.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-jazzmin-2.0.0.tar.gz (2.6 MB view hashes)

Uploaded Source

Built Distribution

django_jazzmin-2.0.0-py2.py3-none-any.whl (2.6 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page