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 (
|
|
|
|
Login, Logout, UserDetails, PasswordChange,
|
|
|
|
PasswordReset, PasswordResetConfirm
|
|
|
|
)
|
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
|
|
|
|
url(r'^password/reset/$', PasswordReset.as_view(),
|
|
|
|
name='rest_password_reset'),
|
|
|
|
url(r'^password/reset/confirm/$', PasswordResetConfirm.as_view(),
|
|
|
|
name='rest_password_reset_confirm'),
|
|
|
|
url(r'^login/$', Login.as_view(), name='rest_login'),
|
|
|
|
# URLs that require a user to be logged in with a valid session / token.
|
|
|
|
url(r'^logout/$', Logout.as_view(), name='rest_logout'),
|
|
|
|
url(r'^user/$', UserDetails.as_view(), name='rest_user_details'),
|
|
|
|
url(r'^password/change/$', PasswordChange.as_view(),
|
|
|
|
name='rest_password_change'),
|
|
|
|
)
|