Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

0.91-bugfixes: Fixed #999 by resolving name clash in the metasystem w…

…hich could confuse manipulators about which fields they should follow. Refs #1808, #1826, #1839 and #2415, which are variations of this that persist in trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/0.91-bugfixes@4673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8a0fa758398768f28d73856275651719d00fe991 1 parent 02ca9fd
James Bennett authored March 07, 2007

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/core/meta/__init__.py
4  django/core/meta/__init__.py
@@ -151,7 +151,7 @@ class BadKeywordArguments(Exception):
151 151
 class BoundRelatedObject(object):
152 152
     def __init__(self, related_object, field_mapping, original):
153 153
         self.relation = related_object
154  
-        self.field_mappings = field_mapping[related_object.opts.module_name]
  154
+        self.field_mappings = field_mapping[related_object.name]
155 155
 
156 156
     def template_name(self):
157 157
         raise NotImplementedError
@@ -165,7 +165,7 @@ def __init__(self, parent_opts, opts, field):
165 165
         self.opts = opts
166 166
         self.field = field
167 167
         self.edit_inline = field.rel.edit_inline
168  
-        self.name = opts.module_name
  168
+        self.name = '%s_%s' % (opts.app_label, opts.module_name)
169 169
         self.var_name = opts.object_name.lower()
170 170
 
171 171
     def flatten_data(self, follow, obj=None):

0 notes on commit 8a0fa75

Please sign in to comment.
Something went wrong with that request. Please try again.