Django

Code

Changeset 4673

Show
Ignore:
Timestamp:
03/07/07 11:03:43 (1 year ago)
Author:
ubernostrum
Message:

0.91-bugfixes: Fixed #999 by resolving name clash in the metasystem which could confuse manipulators about which fields they should follow. Refs #1808, #1826, #1839 and #2415, which are variations of this that persist in trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/0.91-bugfixes/django/core/meta/__init__.py

    r2687 r4673  
    152152    def __init__(self, related_object, field_mapping, original): 
    153153        self.relation = related_object 
    154         self.field_mappings = field_mapping[related_object.opts.module_name] 
     154        self.field_mappings = field_mapping[related_object.name] 
    155155 
    156156    def template_name(self): 
     
    166166        self.field = field 
    167167        self.edit_inline = field.rel.edit_inline 
    168         self.name = opts.module_name 
     168        self.name = '%s_%s' % (opts.app_label, opts.module_name) 
    169169        self.var_name = opts.object_name.lower() 
    170170