Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (50 sloc) 1.85 KB

Quick start guide

For using Grappelli 2.12.2, Django 2.1 needs to be installed and an Admin Site has to be activated.

Installation

$ pip install django-grappelli

Go to https://github.com/sehmaschine/django-grappelli if you need to download a package or clone/fork the repository.

Setup

Open settings.py and add grappelli to your INSTALLED_APPS (before django.contrib.admin):

INSTALLED_APPS = (
    'grappelli',
    'django.contrib.admin',
)

Add URL-patterns. The grappelli URLs are needed for related–lookups and autocompletes. Your admin interface is available with the URL you defined for admin.site:

urlpatterns = [
    path('grappelli/', include('grappelli.urls')), # grappelli URLS
    path('admin/', admin.site.urls), # admin site
]

Add the request context processor (needed for the Dashboard and the Switch User feature):

Collect the media files:

$ python manage.py collectstatic

Testing

Start the devserver and login to your admin site:

$ python manage.py runserver <IP-address>:8000

Check if everything looks/works as expected. If you're having problems, see :ref:`troubleshooting`.