install.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ============
  2. Installation
  3. ============
  4. .. note::
  5. After following this instruction Django JET dashboard won't be active (as it is located into
  6. a separate application). If you want to make it work, you will have to enable dashboard application
  7. by following :doc:`install_dashboard` steps too.
  8. * Download and install latest version of Django JET:
  9. .. code:: python
  10. pip install django-jet
  11. # or
  12. easy_install django-jet
  13. * Add 'jet' application to the INSTALLED_APPS setting of your Django project settings.py file (note it should be before 'django.contrib.admin'):
  14. .. code:: python
  15. INSTALLED_APPS = (
  16. ...
  17. 'jet',
  18. 'django.contrib.admin',
  19. ...
  20. )
  21. * Make sure 'django.core.context_processors.request' context processor is enabled in settings.py:
  22. .. code:: python
  23. from django.conf import global_settings
  24. TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
  25. 'django.core.context_processors.request',
  26. )
  27. * Add URL-pattern to the urlpatterns of your Django project urls.py file (they are needed for related–lookups and autocompletes):
  28. .. code:: python
  29. urlpatterns = patterns(
  30. '',
  31. url(r'^jet/', include('jet.urls', 'jet')), # Django JET URLS
  32. url(r'^admin/', include(admin.site.urls)),
  33. ...
  34. )
  35. * Create database tables:
  36. .. code:: python
  37. python manage.py migrate jet
  38. # or
  39. python manage.py syncdb
  40. * Collect static if you are in production environment:
  41. .. code:: python
  42. python manage.py collectstatic
  43. * Clear your browser cache