From 1cc800783c0f02a8f65e85b53ecb05ae5c0a4d88 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 28 Jan 2012 20:54:48 +0000 Subject: 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 --- docs/ref/contrib/databrowse.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'docs') 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 ` (``urls.py``). -- cgit v1.3