Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #9067: Added a note that you can register a model with the admi…

…n without providing a ModelAdmin object. Thanks to Rob Hudson for the suggestion.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9024 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e600d00b44348d860d2847c4697ad9b21e1824d2 1 parent 7ab3285
Russell Keith-Magee authored September 14, 2008

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. 14  docs/ref/contrib/admin.txt
14  docs/ref/contrib/admin.txt
@@ -50,6 +50,20 @@ Let's take a look at a very simple example the ``ModelAdmin``::
50 50
         pass
51 51
     admin.site.register(Author, AuthorAdmin)
52 52
 
  53
+.. admonition:: Do you need a ``ModelAdmin`` object at all?
  54
+
  55
+    In the preceding example, the ``ModelAdmin`` class doesn't define any
  56
+    custom values (yet). As a result, the default admin interface will be
  57
+    provided. If you are happy with the default admin interface, you don't
  58
+    need to define a ``ModelAdmin`` object at all -- you can register the
  59
+    model class without providing a ``ModelAdmin`` description. The
  60
+    preceding example could be simplified to::
  61
+
  62
+        from django.contrib import admin
  63
+        from myproject.myapp.models import Author
  64
+    
  65
+        admin.site.register(Author)
  66
+    
53 67
 ``ModelAdmin`` Options
54 68
 ----------------------
55 69
 

0 notes on commit e600d00

Please sign in to comment.
Something went wrong with that request. Please try again.