ImportError: No module named django.core.wsgi even if sys.path contains my virtualenv

2013-10-28 Thread Giovanni Allegri
I'm getting mad with this error. I've setup Apache and wsgi configuration as usual, but this time I'm on CentOS instead of Debian, and I don't know it very well. Anyway, I tried all the ways to give mod_wsgi the chance to peak from my virtualenv libraries, both setting them with python-path argum

Re: SimpleLazyObject for request.user not correctly evaluated inside RequestContext

2013-09-12 Thread giovanni allegri
rror exception (e.g. IntegrityError). > > By the way, I think what you are doing is wrong. If the form data is > invalid, then you need to call . form_invalid > > On Friday, September 6, 2013 11:41:34 AM UTC-5, giovanni allegri wrote: >> >> I've opened a ne

Re: call to render_to_response with RequestContext within a Generic View causes DatabaseError when resolving the user.is_authenticated template variable

2013-09-06 Thread giovanni allegri
stead of remaining a SimpleLazyObject. I hope to understand why it happens one day... giovanni Il giorno venerdì 6 settembre 2013 16:10:22 UTC+2, giovanni allegri ha scritto: > > The problem seems to be related with SimpleLazyObject, wrapping the > auth.user. > If during debugging I access the

SimpleLazyObject for request.user not correctly evaluated inside RequestContext

2013-09-06 Thread giovanni allegri
I've opened a new thread, which relates to a previous onefrom me. Digging into a wired behaviour in a FormView I've arrived to the following problem: - In my "form_valid" method I need to manage exceptions situations. - In case

Re: call to render_to_response with RequestContext within a Generic View causes DatabaseError when resolving the user.is_authenticated template variable

2013-09-06 Thread giovanni allegri
The problem seems to be related with SimpleLazyObject, wrapping the auth.user. If during debugging I access the function, everything works fine. It's enough to have the Variables windows open in PyDev. If I do not access it, it isn't resolved to the actual user instance (in my case AnonymousUser

call to render_to_response with RequestContext within a Generic View causes DatabaseError when resolving the user.is_authenticated template variable

2013-09-06 Thread giovanni allegri
I don't know if I'm following a wrong pattern in the context of Django. Inside my class views I need manage exceptions and I would like to pass the response workflow to an external method (my exceptions module). In my call I pass my ClassView.request variable to be able to use request context p

post_syncdb handler never called in an app without models?

2012-08-29 Thread giovanni allegri
I premit that I've never used Django signals, so forgive if it's a trivial question. I have an app without models (models.py empty), but I would like to add custom DB data after every syncdb. I thought I could use the post_syncdb signal to connect my handler method. I wrote it inside management.