Author: DrMeers
Date: 2010-10-08 21:54:48 -0500 (Fri, 08 Oct 2010)
New Revision: 14049

Modified:
   django/trunk/docs/ref/models/fields.txt
Log:
Fixed #5537 -- document trailing '+' on related_name for supressing backward 
relation.

Thanks to dcramer for the report, and Russ for pointing out the workaround.


Modified: django/trunk/docs/ref/models/fields.txt
===================================================================
--- django/trunk/docs/ref/models/fields.txt     2010-10-09 02:11:18 UTC (rev 
14048)
+++ django/trunk/docs/ref/models/fields.txt     2010-10-09 02:54:48 UTC (rev 
14049)
@@ -925,6 +925,15 @@
     <abstract-base-classes>`; and when you do so
     :ref:`some special syntax <abstract-related-name>` is available.
 
+    If you wish to supress the provision of a backwards relation, you may
+    simply provide a ``related_name`` which ends with a '+' character.
+    For example::
+   
+        user = models.ForeignKey(User, related_name='+')
+
+    will ensure that no backwards relation to this model is provided on the 
+    ``User`` model.
+
 .. attribute:: ForeignKey.to_field
 
     The field on the related object that the relation is to. By default, Django

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to