Skip to content

Commit 85a5dc3

Browse files
committed
Upgrade to django-rest-auth 0.5.0
1 parent b2d13f0 commit 85a5dc3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shop/urls/auth.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33
from django.conf.urls import patterns, url
4-
from rest_auth.views import PasswordChange
4+
from rest_auth.views import PasswordChangeView
55
from shop.forms.auth import RegisterUserForm, ContinueAsGuestForm
66
from shop.views.auth import AuthFormsView, LoginView, LogoutView, PasswordResetView
77

@@ -18,6 +18,6 @@
1818

1919
url(r'^logout/$', LogoutView.as_view(),
2020
name='logout'),
21-
url(r'^password/change/$', PasswordChange.as_view(),
21+
url(r'^password/change/$', PasswordChangeView.as_view(),
2222
name='password-change'),
2323
)

shop/views/auth.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from rest_framework.permissions import AllowAny
1111
from rest_framework.renderers import TemplateHTMLRenderer, JSONRenderer, BrowsableAPIRenderer
1212
from rest_framework.response import Response
13-
from rest_auth.views import Login
13+
from rest_auth.views import LoginView as OriginalLoginView
1414
from shop.models.cart import CartModel
1515
from shop.rest.auth import PasswordResetSerializer, PasswordResetConfirmSerializer
1616
from shop.middleware import get_user
@@ -31,7 +31,7 @@ def post(self, request, *args, **kwargs):
3131
return Response(dict(form.errors), status=status.HTTP_400_BAD_REQUEST)
3232

3333

34-
class LoginView(Login):
34+
class LoginView(OriginalLoginView):
3535
def login(self):
3636
"""
3737
Logs in as the given user, and moves the items from the current to the new cart.

0 commit comments

Comments
 (0)