any suggestions anyone ?
On Jun 4, 9:22 am, Mayank Dhingra <[EMAIL PROTECTED]> wrote:
> traceback
>
> UnboundLocalError at /login/
> local variable 'settings' referenced before assignment
>
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
> 'myproject.dual_session_middleware.DualSessionMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.middleware.doc.XViewMiddleware')
>
> Traceback:
> File "C:\django\Python25\Lib\site-packages\django\core\handlers
> \base.py" in get_response
> 82. response = callback(request, *callback_args,
> **callback_kwargs)
> File "C:\django\myproject\..\myproject\myapp\views\auth_view.py" in
> login
> 42. request.session[settings.PERSISTENT_SESSION_KEY] = True
>
> as mentioned earlier when i detect the "rememberme" option in post
> request i set
> request.session[settings.PERSISTENT_SESSION_KEY] = True but once in 5
> times or so it gives the above mentioned error.
>
> On May 30, 4:59 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>
> > On Tue, May 27, 2008 at 3:58 AM, Mayank Dhingra <[EMAIL PROTECTED]>
> > wrote:
>
> > > I am experiencing a strange problem while using
> > > DualSessionMiddleware
>
> > >http://code.djangoproject.com/wiki/CookBookDualSessionMiddleware
>
> > > I've done as directed and in most cases the feature works as expected.
> > > When the request.post contains the "rememberme" i set
>
> > > request.session[settings.PERSISTENT_SESSION_KEY] = True
>
> > > but for some cases about 15-20% while doing so i get this error
>
> > > UnboundLocalError: local variable 'settings' referenced before
> > > assignment
>
> > > Could you suggest what am I doing wrong .?
>
> > Does the traceback show that the line you quote is the one that is causing
> > the UnboundLocalError?
>
> > What is the environment (dev server, Apache, ?) where the error occurs?
>
> > You say 15-20% of the time it fails -- can you see any pattern to when it
> > fails vs. when it works?
>
> > Pasting the full traceback and code in question out on dpaste may help
> > someone see what might be going wrong.
>
> > 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-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---