Author: mtredinnick
Date: 2009-03-24 23:41:40 -0500 (Tue, 24 Mar 2009)
New Revision: 10170
Modified:
django/trunk/django/db/models/fields/related.py
Log:
Fixed a breakage with ManyToManyFields in admin caused by r10139.
Modified: django/trunk/django/db/models/fields/related.py
===================================================================
--- django/trunk/django/db/models/fields/related.py 2009-03-25 03:45:56 UTC
(rev 10169)
+++ django/trunk/django/db/models/fields/related.py 2009-03-25 04:41:40 UTC
(rev 10170)
@@ -644,6 +644,14 @@
self.multiple = True
self.through = through
+ def get_related_field(self):
+ """
+ Returns the field in the to' object to which this relationship is tied
+ (this is always the primary key on the target model). Provided for
+ symmetry with ManyToOneRel.
+ """
+ return self.to._meta.pk
+
class ForeignKey(RelatedField, Field):
empty_strings_allowed = False
def __init__(self, to, to_field=None, rel_class=ManyToOneRel, **kwargs):
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---