Skip to content

Commit

Permalink
Add django 2+ examples in README. fixes #166
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Mar 29, 2020
1 parent ad1ac93 commit 073c215
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
25 changes: 13 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,29 @@ Configuration
=============

To use django-nested-admin in your project, ``"nested_admin"`` must be added
to the ``INSTALLED_APPS`` in your settings and you must include
``nested_admin.urls`` in your django urlpatterns. `django-grappelli
<https://github.com/sehmaschine/django-grappelli>`_ is an optional dependency
of django-nested-admin. If using Grappelli, make sure the `appropriate version
<http://django-grappelli.readthedocs.org/en/latest/#versions>`_ of Grappelli
is installed for your version of Django.
to the ``INSTALLED_APPS`` in your settings:

.. code-block:: python
# settings.py
INSTALLED_APPS = (
# ...
'nested_admin',
)
# urls.py
If you’re using `django-grappelli <https://github.com/sehmaschine/django-grappelli>`_,
you will also need to add to include ``nested_admin.urls`` in your urlpatterns:

urlpatterns = patterns('',
# Django 2+
urlpatterns = [
# ...
url(r'^nested_admin/', include('nested_admin.urls')),
)
path('_nested_admin/', include('nested_admin.urls)),
]

# Django < 2
urlpatterns = [
# ...
url(r'^_nested_admin/', include('nested_admin.urls')),
]

Example Usage
=============
Expand Down
6 changes: 0 additions & 6 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ If you're using django-grappelli, you’ll need to add URL-patterns:
path('_nested_admin/', include('nested_admin.urls)),
]
Collect the static files:
.. code-block:: bash
$ python manage.py collectstatic
Example Usage
=============
Expand Down

0 comments on commit 073c215

Please sign in to comment.