Thank you thank you! That was exactly what I needed. I didnt know that it made a difference for production or development. I greatly appreciate your help.
You made my day. Thanks! Travis On Jan 26, 3:19 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Tue, Jan 26, 2010 at 4:45 PM, ravistb09 <ravist...@gmail.com> wrote: > > I'm getting a 404 from an app in my admin that just controls the > > UserProfile models. The weird thing is, it happens to work perfectly > > fine on my local box, but not on my webserver @ WebFaction, but only > > when Debugging is set to False. To explain a little more, it works > > fine no matter what on my local test machine. But my webfaction > > account has issues. If the debugging is set to true, it works and > > functions fine. But, when it is set to false, and I try to access the > > user profile app from the admin, it is trying to go to the right > > place, but i'm getting a 404 instead. Also, since its a 404 I'm > > getting, I am not getting any errors in the logs to check and try to > > track down what might be causing it. > > > Any ideas on things to check? > > If I'm remembering right, this is characteristic of admin registrations > being placed somewhere where they are not guaranteed to be loaded on receipt > of the first request. For example, models.py. models.py will be loaded by > the development server, and it will be loaded when DEBUG=True, but on a > production web server with DEBUG=False there's no guarantee that it will be > loaded in order to handle an admin url, for example. Thus you may wind up > trying to go to the add/change page for a model that has never been > registered in admin since the code that does the registration has not been > loaded. > > The fix is to put admin registrations in an admin.py file in your app and > ensure that admin.autodiscover() is called in your main urls.py file. > > Karen -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.