Occasionally I see this error in my app,

UnboundLocalError: local variable 'settings' referenced before
assignment

I have in my views .py

from django.conf import settings
....other imports...

def new_view(request):
        if not request.user.is_authenticated():
            return HttpResponseRedirect(settings.ENV_URL) <-=== this
is where error is thrown.
        .......

What could be the reason? How can I prevent from occurring.

I am using django 1.1, python 2.5 and mod_wsgi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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.

Reply via email to