Fix installation instruction in README and documentation

This commit is contained in:
arthur 2016-05-28 02:15:22 +02:00
parent 24a8be2d1d
commit da8b7ad73c
3 changed files with 47 additions and 17 deletions

View file

@ -96,18 +96,17 @@ Add djadmin2 urls to your URLconf:
.. code-block:: python
# urls.py
from django.conf.urls import patterns, include
# urls.py
from django.conf.urls import include
import djadmin2
from djadmin2.site import djadmin2_site
djadmin2.default.autodiscover()
djadmin2_site.autodiscover()
urlpatterns = patterns(
urlpatterns = [
...
url(r'^admin2/', include(djadmin2.default.urls)),
)
]
How to write django-admin2 modules
@ -155,6 +154,21 @@ Therefore, your `settings` need to include this:
'PAGE_SIZE': 10
}
The default admin2 site has move into djadmin2.site make sure your use the news djadmin2_site in your urls.py:
.. code-block:: python
# urls.py
from django.conf.urls import include
from djadmin2.site import djadmin2_site
djadmin2_site.autodiscover()
urlpatterns = [
...
url(r'^admin2/', include(djadmin2.default.urls)),
]
Migrating from 0.5.x
====================

View file

@ -37,8 +37,8 @@ Local Installation
Try the example projects
--------------------------
1. cd into example/ (or example2/)
2. create the database: ``$ python manage.py syncdb``
1. cd into example/
2. create the database: ``$ python manage.py migrate``
3. run the dev server: ``$ python manage.py runserver``
.. _virtualenv: http://www.virtualenv.org/en/latest/

View file

@ -36,18 +36,17 @@ Add djadmin2 urls to your URLconf:
.. code-block:: python
# urls.py
from django.conf.urls import include
import djadmin2
djadmin2.default.autodiscover()
# urls.py
from django.conf.urls import include
from djadmin2.site import djadmin2_site
urlpatterns = [
djadmin2_site.autodiscover()
urlpatterns = [
...
url(r'^admin2/', include(djadmin2.default.urls)),
]
]
Development Installation
=========================
@ -74,6 +73,23 @@ Therefore, your `settings` need to include this:
}
The default admin2 site has move into djadmin2.site make sure your use the news djadmin2_site in your urls.py:
.. code-block:: python
# urls.py
from django.conf.urls import include
from djadmin2.site import djadmin2_site
djadmin2_site.autodiscover()
urlpatterns = [
...
url(r'^admin2/', include(djadmin2.default.urls)),
]
Migrating from 0.5.x
====================