Ticket #3323: django-string-rel.patch
File django-string-rel.patch, 668 bytes (added by , 18 years ago) |
---|
-
django/db/models/options.py
121 121 rel_objs = [] 122 122 for klass in get_models(): 123 123 for f in klass._meta.fields: 124 if f.rel and isinstance(f.rel.to, str): 125 raise Exception("class %s has unresolved string relation" % klass) 124 126 if f.rel and self == f.rel.to._meta: 125 127 rel_objs.append(RelatedObject(f.rel.to, klass, f)) 126 128 self._all_related_objects = rel_objs