Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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: http://code.djangoproject.com/svn/django/trunk@8109 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 633ed5c4c957ca2cd9adc281f7133bf639bd4f19 1 parent ce15b38
Gary Wilson Jr. authored July 27, 2008

Showing 1 changed file with 9 additions and 5 deletions. Show diff stats Hide diff stats

  1. 14  docs/admin.txt
14  docs/admin.txt
@@ -365,11 +365,15 @@ it should prepopulate from::
365 365
     class ArticleAdmin(admin.ModelAdmin):
366 366
         prepopulated_fields = {"slug": ("title",)}
367 367
 
368  
-When set the given fields will use a bit of Javascript to populate from the
369  
-fields assigned.
370  
-
371  
-``prepopulated_fields`` doesn't accept DateTimeFields, ForeignKeys nor
372  
-ManyToManyFields.
  368
+When set, the given fields will use a bit of JavaScript to populate from the
  369
+fields assigned. The main use for this functionality is to automatically
  370
+generate the value for ``SlugField`` fields from one or more other fields. The
  371
+generated value is produced by concatenating the values of the source fields,
  372
+and then by transforming that result into a valid slug (e.g. substituting
  373
+dashes for spaces).
  374
+
  375
+``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``, nor
  376
+``ManyToManyField`` fields.
373 377
 
374 378
 ``radio_fields``
375 379
 ~~~~~~~~~~~~~~~~

0 notes on commit 633ed5c

Please sign in to comment.
Something went wrong with that request. Please try again.