Browse files

Fixed #7986 -- Added to the documentation the purpose of the `prepopu…

…lated_fields` `ModelAdmin` option now that its no longer just a parameter for `SlugField` fields, thanks frasern.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent ce15b38 commit 633ed5c4c957ca2cd9adc281f7133bf639bd4f19 @gdub gdub committed Jul 27, 2008
Showing with 9 additions and 5 deletions.
  1. +9 −5 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.
-``prepopulated_fields`` doesn't accept DateTimeFields, ForeignKeys nor
+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 ``DateTimeField``, ``ForeignKey``, nor
+``ManyToManyField`` fields.

0 comments on commit 633ed5c

Please sign in to comment.