Metadata-Version: 2.1
Name: django-stisla
Version: 0.0.4
Summary: A Bootstrap template for Django Admin
Home-page: https://github.com/jituboss/django-stisla
Author: Rezaur Rahman
Author-email: rez28r@gmail.com
License: GNU General Public License v3.0
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
License-File: LICENSE

=============
Django Stisla
=============

Django Stisla is a Bootstrap 4 based admin template for Django admin interface developed using the `stisla <https://github.com/stisla/stisla>`_ free bootstrap admin template.

Installation
------------

Install the package from PyPi::

    pip install django-stisla
         

Quick start
-----------

1. Add "django_stisla.apps.admin" with "django.contrib.admin" & "django.contrib.auth" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'django_stisla',
        'django.contrib.admin',
        'django.contrib.auth',
        ...
    ]

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 %}
