Changes between Initial Version and Version 1 of Ticket #13241
- Timestamp:
- Mar 29, 2010, 9:10:33 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13241 – Description
initial v1 1 1 If I specify 'order_with_respect_to' on a field linked to a model that hasn't been defined yet, I get the following error: 2 {{{ 2 3 <...>File "/usr/lib/python2.6/dist-packages/django/db/models/base.py", line 223, in _prepare 3 4 setattr(opts.order_with_respect_to.rel.to, 'get_%s_order' % cls.__name__.lower(), curry(method_get_order, cls)) 4 5 AttributeError: 'str' object has no attribute 'get_location_order' 5 6 }}} 6 7 When I swap declarations of Location and City models, the error disappears. 7 8 8 9 Here is the code: 9 10 {{{ 10 11 class Location(TimeStampedModel): 11 12 '''Single location on a map, e.g. building.''' … … 26 27 verbose_name = u"город" 27 28 verbose_name_plural = u"города" 29 }}}