#12867: admin::list_editable causes failure of reverse one to many lookup
-------------------------------------------+--------------------------------
          Reporter:  daob                  |         Owner:  nobody
            Status:  closed                |     Milestone:        
         Component:  django.contrib.admin  |       Version:  1.1   
        Resolution:  duplicate             |      Keywords:        
             Stage:  Unreviewed            |     Has_patch:  0     
        Needs_docs:  0                     |   Needs_tests:  0     
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Comment (by daob):

 Replying to [comment:3 kmtracey]:
 > OK, now this looks like #11448.

 I believe you. However, that ticket says

 ''I retract this ticket, I just found that this creates issues elsewhere
 as well, which cannot be solved this easily. A warning in the docs about
 not doing models.py-level queries or mixing forms and models would be
 appreciated though.''

 But as far as I am able to tell as a user, I am not doing any queries in
 models.py.


 > Note putting that bug aside, you should not be putting admin definitions
 and registrations in your `models.py` file. In a production server setup
 it's quite possible your models file won't be loaded as early as it is
 with the dev server. A consequence of delayed loading, if you have your
 admin definitions there, will be that your admin site doesn't have all the
 models registered that you expect it to. The fix is to put all your admin
 definitions and registrations in an `admin.py` file and include a call to
 `admin.autodiscover()` in `urls.py`. A side-effect of following that
 practice will be that you won't encounter this bug.

 Thanks, I never got around to changing that since this is the new
 recommendation. Now I followed your advice.

 After I move all admin related things to admin.py, the testcase I gave
 indeed works, but the bigger application I have still does not. Even
 though there is no other models.py. Presumably, somewhere, something
 happens (unrelated to the whole admin.py business) that triggers the bug.

 So the current status of this bug for me is still that there is no fix and
 nobody is planning to make one...

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12867#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to