Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #6120: First stab at documenting newforms field types which han…

…dle relationships.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent a752a3d commit 75617ef69f7b0fa491ce1d3cb5d4a8d478203ad1 @ubernostrum ubernostrum committed
Showing with 27 additions and 0 deletions.
  1. +27 −0 docs/newforms.txt
27 docs/newforms.txt
@@ -1499,6 +1499,33 @@ the bottom of this document, for examples of their use.
+Fields which handle relationships
+For representing relationships between models, two fields are
+provided which can derive their choices from a ``QuerySet``, and which
+place one or more model objects into the ``cleaned_data`` dictionary
+of forms in which they're used. Both of these fields have an
+additional required argument:
+ A ``QuerySet`` of model objects from which the choices for the
+ field will be derived, and which will be used to validate the
+ user's selection.
+Allows the selection of a single model object, suitable for
+representing a foreign key.
+Allows the selection of one or more model objects, suitable for
+representing a many-to-many relation.
Creating custom fields

0 comments on commit 75617ef

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