diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2008-07-27 18:27:56 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2008-07-27 18:27:56 +0000 |
| commit | 633ed5c4c957ca2cd9adc281f7133bf639bd4f19 (patch) | |
| tree | 5b6809826b8eecb9cbffed165684aebf027aa11c /docs | |
| parent | ce15b389c188205b3117c044a71c5d163e913948 (diff) | |
Fixed #7986 -- Added to the documentation the purpose of the `prepopulated_fields` `ModelAdmin` option now that its no longer just a parameter for `SlugField` fields, thanks frasern.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8109 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/admin.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/admin.txt b/docs/admin.txt index df96aa944b..e4f2d7668a 100644 --- a/docs/admin.txt +++ b/docs/admin.txt @@ -365,11 +365,15 @@ it should prepopulate from:: class ArticleAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ("title",)} -When set the given fields will use a bit of Javascript to populate from the -fields assigned. +When set, the given fields will use a bit of JavaScript to populate from the +fields assigned. The main use for this functionality is to automatically +generate the value for ``SlugField`` fields from one or more other fields. The +generated value is produced by concatenating the values of the source fields, +and then by transforming that result into a valid slug (e.g. substituting +dashes for spaces). -``prepopulated_fields`` doesn't accept DateTimeFields, ForeignKeys nor -ManyToManyFields. +``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``, nor +``ManyToManyField`` fields. ``radio_fields`` ~~~~~~~~~~~~~~~~ |
