diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2006-05-10 04:30:47 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2006-05-10 04:30:47 +0000 |
| commit | c386867d7424c4987ee1280dc7c88f5a8903405c (patch) | |
| tree | 2df568a14a658bd02f6f181b43af2ad75f68d902 | |
| parent | 89c6a07a5ff548fa90879e46cdb11c02e2cc0e20 (diff) | |
multi-auth: Updated comments app to use new auth api.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@2889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/comments/views/comments.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/comments/views/comments.py b/django/contrib/comments/views/comments.py index ecacc1f1c5..fd49058b15 100644 --- a/django/contrib/comments/views/comments.py +++ b/django/contrib/comments/views/comments.py @@ -5,7 +5,6 @@ from django.http import Http404 from django.core.exceptions import ObjectDoesNotExist from django.shortcuts import render_to_response from django.template import RequestContext -from django.contrib.auth.models import SESSION_KEY from django.contrib.comments.models import Comment, FreeComment, PHOTOS_REQUIRED, PHOTOS_OPTIONAL, RATINGS_REQUIRED, RATINGS_OPTIONAL, IS_PUBLIC from django.contrib.contenttypes.models import ContentType from django.contrib.auth.forms import AuthenticationForm @@ -219,7 +218,8 @@ def post_comment(request): # If user gave correct username/password and wasn't already logged in, log them in # so they don't have to enter a username/password again. if manipulator.get_user() and new_data.has_key('password') and manipulator.get_user().check_password(new_data['password']): - request.session[SESSION_KEY] = manipulator.get_user_id() + from django.contrib.auth import login + login(request, manipulator.get_user()) if errors or request.POST.has_key('preview'): class CommentFormWrapper(forms.FormWrapper): def __init__(self, manipulator, new_data, errors, rating_choices): |
