problems while running through django.core.handlers.wsgi.WSGIHandler

53 views
Skip to first unread message

vv2

unread,
Aug 26, 2008, 11:35:15 AM8/26/08
to Django users
I am running my app on latest trunk (r8580 at the moment of writing
this post) and I have nothing but problems while trying to deploy my
stuff over mod_wsgi.

Exception I am receiving is generic " 'str' object has no attribute
'_default_manager' " which shows up when something goes wrong with
admin.autodiscover() at urls.py.

My first thought was that I probably missed over something while
porting my bits to newforms-admin from pre 1.0-alpha trunk, but after
a while I realized that gremlins are coming out only while WSGIHandler
is used - this means running Django through cherrypy, spawning and
mod_wsgi. Dev server, mod_python and FCGI (through lighttpd) works
perfectly fine with same code.

The source of problems is one - very simple app which contains one
model, one ModelAdmin and one view. After trying to narrow source of
problems to find out which portion of code is causing the problems I
found out that everything is running fine when I comment out fieldsets
definition in my ModelAdmin.

That's pretty weird and I believe there is nothing wrong with my code
(it works through interfaces other than WSGI!).

Any kind of lead that I could follow to make my code working through
WSGI would be highly appreciated!

Thanks

Karen Tracey

unread,
Aug 26, 2008, 11:48:41 AM8/26/08
to django...@googlegroups.com
Your problem description (minus the fact that it is specific to mod_wsgi, which sounds like a significant Clue) is reminiscent of this old thread:

http://groups.google.com/group/django-users/browse_thread/thread/6ef7622e8e7aa6a5/eb2d54fad5a8385f?

I believe I also had another person email me privately saying they were seeing this error message, but no one was ever able to provide a small test project that demonstrated the error (and the original poster on that thread stopped hitting the error after updating & splitting out the admin definitions into admin.py).

It sounds like there is likely a bug hidden somewhere here, but we need a reliable way of recreating it in order to figure out what is going on.  If you can help out with providing a small testcase that demonstrates the problem I'm sure it would be appreciated.

Karen

vv2

unread,
Aug 26, 2008, 12:07:55 PM8/26/08
to Django users
Hi Karen,

Thanks for your immediate reply!

I will extract problematic app into separate project and get in touch
with you later this day.

Many thanks!
> http://groups.google.com/group/django-users/browse_thread/thread/6ef7...
> ?

Karen Tracey

unread,
Aug 26, 2008, 4:42:35 PM8/26/08
to django...@googlegroups.com
On Tue, Aug 26, 2008 at 12:07 PM, vv2 <vva...@gmail.com> wrote:

Hi Karen,

Thanks for your immediate reply!

I will extract problematic app into separate project and get in touch
with you later this day.


OK, I was able to recreate with the project provided.  I too see the failure only under mod_wsgi, not the dev server (those were the only two I tried).  The cause is too murky for me to pinpoint; I've opened #8569 to hopefully get someone who knows more about what happens in terms of resolving string references to models cross-app to take a look at it.

Karen

Reply all
Reply to author
Forward
0 new messages