2014-10-08 14:19:15 +04:00
|
|
|
from django.conf.urls import patterns, 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
|
|
|
|
2015-04-28 11:04:20 +03:00
|
|
|
urlpatterns = patterns(
|
|
|
|
'',
|
2014-10-08 14:19:15 +04:00
|
|
|
# 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(),
|
2014-10-08 14:19:15 +04:00
|
|
|
name='rest_password_reset'),
|
2015-08-07 13:54:45 +03:00
|
|
|
url(r'^password/reset/confirm/$', PasswordResetConfirmView.as_view(),
|
2014-10-08 14:19:15 +04:00
|
|
|
name='rest_password_reset_confirm'),
|
2015-08-07 13:54:45 +03:00
|
|
|
url(r'^login/$', LoginView.as_view(), name='rest_login'),
|
2014-10-08 14:19:15 +04:00
|
|
|
# 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(),
|
2014-10-08 14:19:15 +04:00
|
|
|
name='rest_password_change'),
|
|
|
|
)
|