Skip to content

Commit

Permalink
0.91-bugfixes: Fixed #999 by resolving name clash in the metasystem w…
Browse files Browse the repository at this point in the history
…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
ubernostrum committed Mar 7, 2007
1 parent 7539fed commit 145b2a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/core/meta/__init__.py
Expand Up @@ -151,7 +151,7 @@ class BadKeywordArguments(Exception):
class BoundRelatedObject(object):
def __init__(self, related_object, field_mapping, original):
self.relation = related_object
self.field_mappings = field_mapping[related_object.opts.module_name]
self.field_mappings = field_mapping[related_object.name]

def template_name(self):
raise NotImplementedError
Expand All @@ -165,7 +165,7 @@ def __init__(self, parent_opts, opts, field):
self.opts = opts
self.field = field
self.edit_inline = field.rel.edit_inline
self.name = opts.module_name
self.name = '%s_%s' % (opts.app_label, opts.module_name)
self.var_name = opts.object_name.lower()

def flatten_data(self, follow, obj=None):
Expand Down

0 comments on commit 145b2a4

Please sign in to comment.