Author: russellm
Date: 2008-09-14 03:58:16 -0500 (Sun, 14 Sep 2008)
New Revision: 9024
Modified:
django/trunk/docs/ref/contrib/admin.txt
Log:
Fixed #9067: Added a note that you can register a model with the admin without
providing a ModelAdmin object. Thanks to Rob Hudson for the suggestion.
Modified: django/trunk/docs/ref/contrib/admin.txt
===================================================================
--- django/trunk/docs/ref/contrib/admin.txt 2008-09-14 08:36:58 UTC (rev
9023)
+++ django/trunk/docs/ref/contrib/admin.txt 2008-09-14 08:58:16 UTC (rev
9024)
@@ -50,6 +50,20 @@
pass
admin.site.register(Author, AuthorAdmin)
+.. admonition:: Do you need a ``ModelAdmin`` object at all?
+
+ In the preceding example, the ``ModelAdmin`` class doesn't define any
+ custom values (yet). As a result, the default admin interface will be
+ provided. If you are happy with the default admin interface, you don't
+ need to define a ``ModelAdmin`` object at all -- you can register the
+ model class without providing a ``ModelAdmin`` description. The
+ preceding example could be simplified to::
+
+ from django.contrib import admin
+ from myproject.myapp.models import Author
+
+ admin.site.register(Author)
+
``ModelAdmin`` Options
----------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---