On Sep 28, 10:30 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote:
> Do you have sessions enabled?  
> seehttp://www.djangoproject.com/documentation/authentication/#authentica...
> details.

I think I have sessions enabled. At least in django.settings I do:

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
)

The problem is not that sessions do not work. They do.
The problem is that after login() I do a redirect. In the view where
the redirect ends up I am not considered logged in the first time I
get there. After a refresh I am, but that is just a bit strange.

> As you are not doing anything special with your login function, have
> you considered using the @login_required decorator on the
> dashboard view?  I know that some people have an aversion to
> decorators, but this may simplify things.

I tried out the decorator, it changes my code a bit, but still doesn't
fix my problem.

~Alper


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

Reply via email to