1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

magic-removal: Fixed #1712 -- Removed typo and clarified use of admin options in model-api docs

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2772 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2006-04-28 23:13:29 +00:00
parent 6ec3a4d9ee
commit 1809f6e256

View File

@ -921,6 +921,8 @@ Here's a list of all possible ``Admin`` options. No options are required. Adding
For example (taken from the ``django.contrib.flatpages`` model)::
class Admin:
...
fields = (
(None, {
'fields': ('url', 'title', 'content', 'sites')
@ -929,7 +931,7 @@ Here's a list of all possible ``Admin`` options. No options are required. Adding
'classes': 'collapse',
'fields' : ('enable_comments', 'registration_required', 'template_name')
}),
),
)
results in an admin that looks like:
@ -978,8 +980,10 @@ Here's a list of all possible ``Admin`` options. No options are required. Adding
Here's an example of how ``list_display`` and ``list_filter`` work (taken
from the ``auth.user`` model)::
list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff'),
list_filter = ('is_staff', 'is_superuser'),
class Admin:
#...
list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
list_filter = ('is_staff', 'is_superuser')
The above code results in an admin that looks like this: