Changes between Initial Version and Version 1 of Ticket #13241


Ignore:
Timestamp:
03/29/2010 09:10:33 AM (5 years ago)
Author:
ramiro
Comment:

(reformatted description, please use the 'Preview' button)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13241

    • Property Needs documentation unset
    • Property Needs tests unset
    • Property Patch needs improvement unset
  • Ticket #13241 – Description

    initial v1  
    11If 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{{{
    23<...>File "/usr/lib/python2.6/dist-packages/django/db/models/base.py", line 223, in _prepare
    34    setattr(opts.order_with_respect_to.rel.to, 'get_%s_order' % cls.__name__.lower(), curry(method_get_order, cls))
    45AttributeError: 'str' object has no attribute 'get_location_order'
    5 
     6}}}
    67When I swap declarations of Location and City models, the error disappears.
    78
    89Here is the code:
    9 
     10{{{
    1011class Location(TimeStampedModel):
    1112    '''Single location on a map, e.g. building.'''
     
    2627        verbose_name = u"город"
    2728        verbose_name_plural = u"города"
     29}}}
Back to Top