mirror of https://github.com/django/django.git
Documented {{{singular}}} argument for m2m relationships (fixes #664).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7e0719efa6
commit
fb55717a09
|
@ -621,6 +621,14 @@ the relationship should work. All are optional:
|
||||||
vertically).
|
vertically).
|
||||||
|
|
||||||
``limit_choices_to`` See the description under ``ForeignKey`` above.
|
``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
|
One-to-one relationships
|
||||||
|
|
Loading…
Reference in New Issue