install.rst 1.3 KB

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