Having looked through the archived posts, i found a similar problem
that had found no solution:
http://groups.google.com/group/django-users/browse_thread/thread/bf05...

It looks like django is not actually logging my user in, or not
creating a session.  I have a very simple snippet for login
functionality pretty much lifted directly from the docs:

from django.contrib.auth import logout, login, authenticate

def login(request):
  news_list = New.objects.all().order_by('-date')
  if request.method == 'POST':
    username = request.POST['username']
    password = request.POST['password']
    user = auth.authenticate(username=username, password=password)
    if user is not None:
          if user.is_active:
            login(request,user)
          return HttpResponseRedirect('/')
    else:
      return render_to_response('registration.html', locals())

settings.py:
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'intrinsic.site',
)

I've posted once before and no one really had a solution, though i've
seen that a few people have had the same problem, though they too had
found no solutions.  After some debugging, i've found out definitively
that all of my code works, OTHER than that one line with
"login(request,user)."  If i log in through the admin interface, then
navigate to my site, all of the login responsive content changes the
way it should, however logging in through my main page interface still
does not do anything.  I haven't seen a posted bug regarding
login(request,user), so i'm assuming there is something subtle about
how the login sessions are created through the site that i am
missing.  Any ideas or solutions would really be great, otherwise i'm
going to have to pull out some mickey mouse code on this one.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to