Ticket #2684: 2684.patch
File 2684.patch, 1.2 KB (added by , 18 years ago) |
---|
-
django/db/models/base.py
90 90 91 91 def __init__(self, *args, **kwargs): 92 92 dispatcher.send(signal=signals.pre_init, sender=self.__class__, args=args, kwargs=kwargs) 93 self._meta._init() 93 94 for f in self._meta.fields: 94 95 if isinstance(f.rel, ManyToOneRel): 95 96 try: -
django/db/models/options.py
74 74 if not self.db_table: 75 75 self.db_table = "%s_%s" % (self.app_label, self.module_name) 76 76 77 def _init(self): 78 "Initialization performed on creation of an object instance." 79 # Instantiate the caches of related objects 80 self.get_all_related_many_to_many_objects() 81 self.get_all_related_objects() 82 77 83 def add_field(self, field): 78 84 # Insert the given field in the order in which it was created, using 79 85 # the "creation_counter" attribute of the field.