diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2005-10-30 14:35:44 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2005-10-30 14:35:44 +0000 |
| commit | fb55717a09fb7f92c76d1af23b2717b7a0610d03 (patch) | |
| tree | 264618817b347161f4bca7915eeffd9cf56569ec /docs | |
| parent | 7e0719efa6b579270601692f1125f88dd1e0002c (diff) | |
Documented {{{singular}}} argument for m2m relationships (fixes #664).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/model-api.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt index 3522585e7a..edf94dd17c 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -621,6 +621,14 @@ the relationship should work. All are optional: vertically). ``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 |
