Ticket #3103: related.py.diff

File related.py.diff, 423 bytes (added by Eric Van Dewoestine <ervandew@…>, 18 years ago)
Line 
1*** related.py Fri Dec 1 16:06:21 2006
2--- related.py.new Fri Dec 1 16:06:27 2006
3***************
4*** 22,27 ****
5--- 22,29 ----
6 def add_lookup(rel_cls, field):
7 name = field.rel.to
8 module = rel_cls.__module__
9+ if name.find('.') != -1:
10+ module, name = name.rsplit('.', 1)
11 key = (module, name)
12 # Has the model already been loaded?
13 # If so, resolve the string reference right away
Back to Top