Commit e600d00b authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #9067: Added a note that you can register a model with the admin without...

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.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9024 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 7ab3285f
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -50,6 +50,20 @@ Let's take a look at a very simple example the ``ModelAdmin``::
        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
----------------------