diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-01-28 20:54:48 +0000 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-01-28 20:54:48 +0000 |
| commit | 1cc800783c0f02a8f65e85b53ecb05ae5c0a4d88 (patch) | |
| tree | d66e497ab75a09b031e4fd4486a3f4a2c0bfd88b /docs | |
| parent | 4a3aceed3f0d93e675288edfdf598c8b2e9811b8 (diff) | |
Fixed #5968 -- Allowed (un-)registering with databrowse several models at once.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/databrowse.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/ref/contrib/databrowse.txt b/docs/ref/contrib/databrowse.txt index f8fedc4482..3d411bb7b4 100644 --- a/docs/ref/contrib/databrowse.txt +++ b/docs/ref/contrib/databrowse.txt @@ -33,13 +33,18 @@ How to use Databrowse 2. Register a number of models with the Databrowse site:: from django.contrib import databrowse - from myapp.models import SomeModel, SomeOtherModel + from myapp.models import SomeModel, SomeOtherModel, YetAnotherModel databrowse.site.register(SomeModel) - databrowse.site.register(SomeOtherModel) + databrowse.site.register(SomeOtherModel, YetAnotherModel) Note that you should register the model *classes*, not instances. + .. versionchanged:: 1.4 + + Since Django 1.4, it is possible to register several models in the same + call to :func:`~databrowse.site.register`. + It doesn't matter where you put this, as long as it gets executed at some point. A good place for it is in your :doc:`URLconf file </topics/http/urls>` (``urls.py``). |
