Skip to main content

Django Stisla

Django Stisla is a Bootstrap 4 based admin template for Django admin interface developed using the stisla free bootstrap admin template.

Installation

Install the package from PyPi:

pip install django-stisla

Quick start

  1. Add “django_stisla.apps.admin” and “widget_tweaks” with “django.contrib.admin” & “django.contrib.auth” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'django_stisla',
        'django.contrib.admin',
        'django.contrib.auth',
        ...
        'widget_tweaks'
    ]
  2. Make sure django.template.context_processors.request is enabled in project settings.py:

    TEMPLATES = [
        {
            'BACKEND': 'django.template.backends.django.DjangoTemplates',
            'DIRS': [],
            'APP_DIRS': True,
            'OPTIONS': {
                'context_processors': [
                    ...
                    'django.template.context_processors.request',
                    ...
                ],
            },
        },
    ]
  3. Include the admin URLconf in your project urls.py like this:

    ...
    from django_stisla import admin
    ...
    urlpatterns = [
        ...
        path('admin/', admin.site.urls),
        ...
    ]
  4. You can set following theme configurations in URLconf:

    ...
    admin.site.site_header = "Django administration"
    admin.site.site_title = "Django site admin"
    admin.site.index_title = "Site administration"
    admin.site.site_short_title = "DJ"
    ...
  5. Start the development server and visit http://127.0.0.1:8000/admin/ to see your newly installed Django Stisla for admin.

Admin Model Registration

To register your models in Django admin, please import “from django_stisla.admin” in your applications admin.py and register your models as follows:

...
from django_stisla.admin import site
...
...
site.register(Image)
site.register(Author)
site.register(Topic)
...

Theme Customizations

To set logo/title in admin login page, please create templates/admin/login.html file in your application and use the following code:

{% extends "admin/login.html" %}

{% block login-brand %}
<div class="login-brand">
    <h1>Django Administration</h1>
</div>
{% endblock %}

To add extra CSS to dashboard theme, create static/admin/assets/css/extra.css file in your app. For example you can customize Font-awesome icons in the sidebar menu as follows based on your loaded apps in django:

/* Custom font awesome icon for django auth app */

.fa-auth:before {
    content: "\f023";
}

/* Custom font awesome icon for an app name cms */

.fa-cms:before {
    content: "\f0ad";
}

/* Custom font awesome icon for an app name order */

.fa-order:before {
    content: "\f07b";
}

Metadata

Release files for django-stisla 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-stisla 0.0.8
File Size Uploaded
django-stisla-0.0.8.tar.gz 12.1 MB Details

Release files / django-stisla-0.0.8.tar.gz

Download URL django-stisla-0.0.8.tar.gz
Size 12.1 MB
Tags Source
SHA-256 checksum
How to use checksums
2e3183014b115a1e951b749454ba08267e723f683db82610fa2274e98bf1bff0
BLAKE2b-256 checksum
How to use checksums
6c576ef207a57672189249d062bf99ede9d5793eb18c1ce69156a39540f5d86d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 release file

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page