mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-21 16:46:33 +03:00
closes PR #134 and adds same syntax to demo
This commit is contained in:
parent
4a56a9e7e5
commit
0e3fb4a5c9
|
@ -1,8 +1,8 @@
|
|||
from django.conf.urls import patterns, include, url
|
||||
from django.conf.urls import include, url
|
||||
from django.contrib import admin
|
||||
from django.views.generic import TemplateView, RedirectView
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = [
|
||||
url(r'^$', TemplateView.as_view(template_name="home.html"), name='home'),
|
||||
url(r'^signup/$', TemplateView.as_view(template_name="signup.html"),
|
||||
name='signup'),
|
||||
|
@ -36,4 +36,4 @@ urlpatterns = patterns('',
|
|||
url(r'^account/', include('allauth.urls')),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^accounts/profile/$', RedirectView.as_view(url='/', permanent=True), name='profile-redirect'),
|
||||
)
|
||||
]
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
from django.views.generic import TemplateView
|
||||
from django.conf.urls import patterns, url
|
||||
from django.conf.urls import url
|
||||
|
||||
from .views import RegisterView, VerifyEmailView
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
urlpatterns = [
|
||||
url(r'^$', RegisterView.as_view(), name='rest_register'),
|
||||
url(r'^verify-email/$', VerifyEmailView.as_view(), name='rest_verify_email'),
|
||||
|
||||
|
@ -21,4 +20,4 @@ urlpatterns = patterns(
|
|||
# djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190
|
||||
url(r'^account-confirm-email/(?P<key>\w+)/$', TemplateView.as_view(),
|
||||
name='account_confirm_email'),
|
||||
)
|
||||
]
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
from django.conf.urls import patterns, url
|
||||
from django.conf.urls import url
|
||||
|
||||
from rest_auth.views import (
|
||||
LoginView, LogoutView, UserDetailsView, PasswordChangeView,
|
||||
PasswordResetView, PasswordResetConfirmView
|
||||
)
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
urlpatterns = [
|
||||
# URLs that do not require a session or valid token
|
||||
url(r'^password/reset/$', PasswordResetView.as_view(),
|
||||
name='rest_password_reset'),
|
||||
|
@ -18,4 +17,4 @@ urlpatterns = patterns(
|
|||
url(r'^user/$', UserDetailsView.as_view(), name='rest_user_details'),
|
||||
url(r'^password/change/$', PasswordChangeView.as_view(),
|
||||
name='rest_password_change'),
|
||||
)
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user