Installation¶
Note
After following this instruction Django JET dashboard won’t be active (as it is located into a separate application). If you want to make it work, you will have to enable dashboard application by following Dashboard Installation steps too.
- Download and install latest version of Django JET:
pip install django-jet2
# or
easy_install django-jet2
- Add ‘jet’ application to the INSTALLED_APPS setting of your Django project settings.py file (note it should be before ‘django.contrib.admin’):
INSTALLED_APPS = (
...
'jet',
'django.contrib.admin',
...
)
- Make sure
django.template.context_processors.request
context processor is enabled in settings.py:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
...
'django.template.context_processors.request',
...
],
},
},
]
- Add URL-pattern to the urlpatterns of your Django project urls.py file (they are needed for related–lookups and autocompletes):
urlpatterns = patterns(
'',
path('jet/', include('jet.urls', 'jet')), # Django JET URLS
path('admin/', include(admin.site.urls)),
...
)
- Create database tables:
python manage.py migrate jet
- Collect static if you are in production environment:
python manage.py collectstatic
- Clear your browser cache