mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-04-20 08:42:01 +03:00
Merge f1f434dce1
into cdd04aa9be
This commit is contained in:
commit
a782c2d53f
|
@ -1,5 +1,5 @@
|
|||
from django.http import HttpRequest
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
try:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.conf import settings
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.decorators.debug import sensitive_post_parameters
|
||||
|
||||
from rest_framework.views import APIView
|
||||
|
|
|
@ -3,8 +3,8 @@ from django.conf import settings
|
|||
from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm
|
||||
from django.contrib.auth.tokens import default_token_generator
|
||||
from django.utils.http import urlsafe_base64_decode as uid_decoder
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
from rest_framework import serializers, exceptions
|
||||
from rest_framework.exceptions import ValidationError
|
||||
|
|
|
@ -2,7 +2,7 @@ import json
|
|||
|
||||
from django.conf import settings
|
||||
from django.test.client import Client, MULTIPART_CONTENT
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
from rest_framework import status
|
||||
from rest_framework import permissions
|
||||
|
|
|
@ -2,7 +2,7 @@ from django.test import TestCase, override_settings
|
|||
from django.contrib.auth import get_user_model
|
||||
from django.core import mail
|
||||
from django.conf import settings
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
from allauth.account import app_settings as account_app_settings
|
||||
from rest_framework import status
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from django.conf.urls import url
|
||||
from django.urls import path
|
||||
|
||||
from rest_auth.views import (
|
||||
LoginView, LogoutView, UserDetailsView, PasswordChangeView,
|
||||
|
@ -7,14 +7,14 @@ from rest_auth.views import (
|
|||
|
||||
urlpatterns = [
|
||||
# URLs that do not require a session or valid token
|
||||
url(r'^password/reset/$', PasswordResetView.as_view(),
|
||||
path('password/reset/', PasswordResetView.as_view(),
|
||||
name='rest_password_reset'),
|
||||
url(r'^password/reset/confirm/$', PasswordResetConfirmView.as_view(),
|
||||
path('password/reset/confirm/', PasswordResetConfirmView.as_view(),
|
||||
name='rest_password_reset_confirm'),
|
||||
url(r'^login/$', LoginView.as_view(), name='rest_login'),
|
||||
path('login/', LoginView.as_view(), name='rest_login'),
|
||||
# URLs that require a user to be logged in with a valid session / token.
|
||||
url(r'^logout/$', LogoutView.as_view(), name='rest_logout'),
|
||||
url(r'^user/$', UserDetailsView.as_view(), name='rest_user_details'),
|
||||
url(r'^password/change/$', PasswordChangeView.as_view(),
|
||||
path('logout/', LogoutView.as_view(), name='rest_logout'),
|
||||
path('user/', UserDetailsView.as_view(), name='rest_user_details'),
|
||||
path('password/change/', PasswordChangeView.as_view(),
|
||||
name='rest_password_change'),
|
||||
]
|
||||
]
|
|
@ -6,7 +6,7 @@ from django.conf import settings
|
|||
from django.contrib.auth import get_user_model
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.decorators.debug import sensitive_post_parameters
|
||||
|
||||
from rest_framework import status
|
||||
|
|
Loading…
Reference in New Issue
Block a user