Browse files

Documented {{{singular}}} argument for m2m relationships (fixes #664).

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
jacobian committed Oct 30, 2005
1 parent 7e0719e commit fb55717a09fb7f92c76d1af23b2717b7a0610d03
Showing with 8 additions and 0 deletions.
  1. +8 −0 docs/model-api.txt
@@ -621,6 +621,14 @@ the relationship should work. All are optional:
``limit_choices_to`` See the description under ``ForeignKey`` above.
+ ``singular`` The singular name of the field. Use to name the ``get_*``
+ methods: in the example above, Django gives the ``Pizza``
+ objects a ``get_topping_list()`` method, where ``topping``
+ is the default ``singular`` value derived from the lowercase
+ version of the class being linked to. Use the singular
+ parameter to change this, which is if you want one model to
+ have multiple ``ManyToMany`` relationships to another model.
======================= ============================================================
One-to-one relationships

0 comments on commit fb55717

Please sign in to comment.