django-rest-auth/rest_auth/urls.py

21 lines
845 B
Python
Raw Permalink Normal View History

from django.conf.urls import url
2014-04-30 23:52:05 +04:00
2015-04-28 11:04:20 +03:00
from rest_auth.views import (
2015-08-07 13:54:45 +03:00
LoginView, LogoutView, UserDetailsView, PasswordChangeView,
PasswordResetView, PasswordResetConfirmView
2015-04-28 11:04:20 +03:00
)
2014-04-30 23:52:05 +04:00
urlpatterns = [
# URLs that do not require a session or valid token
2015-08-07 13:54:45 +03:00
url(r'^password/reset/$', PasswordResetView.as_view(),
name='rest_password_reset'),
2015-08-07 13:54:45 +03:00
url(r'^password/reset/confirm/$', PasswordResetConfirmView.as_view(),
name='rest_password_reset_confirm'),
2015-08-07 13:54:45 +03:00
url(r'^login/$', LoginView.as_view(), name='rest_login'),
# URLs that require a user to be logged in with a valid session / token.
2015-08-07 13:54:45 +03:00
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(),
name='rest_password_change'),
]