django-admin2/docs/installation.rst
2016-05-22 15:06:02 +02:00

62 lines
1.2 KiB
ReStructuredText

============
Installation
============
.. index:: installation
Adding django-admin2 to your project
====================================
Use pip to install from PyPI:
.. code-block:: python
pip install django-admin2
Add djadmin2 and rest_framework to your settings file:
.. code-block:: python
INSTALLED_APPS = (
...
'djadmin2',
'djadmin2.themes.djadmin2theme_default', # for the default theme
'rest_framework', # for the browsable API templates
'floppyforms', # For HTML5 form fields
'crispy_forms', # Required for the default theme's layout
...
)
Add djadmin2 urls to your URLconf:
.. code-block:: python
# urls.py
from django.conf.urls import include
import djadmin2
djadmin2.default.autodiscover()
urlpatterns = [
...
url(r'^admin2/', include(djadmin2.default.urls)),
]
Development Installation
=========================
See :doc:`contributing`.
Migrating from 0.5.x
====================
Themes are now defined explicitly, including the default theme. Therefore, your `settings` need to include this:
.. code-block:: python
# In settings.py
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default/"