from django.conf.urls import patterns, url from signup.views import SignupView urlpatterns = patterns('', url(r'^$', SignupView.as_view(), name='signup'), )
"""myproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path from signup.views import SignupView from django.views.generic import TemplateView urlpatterns = [ path('admin/', admin.site.urls), path('signup/', SignupView.as_view(), name='signup'), path('success/', TemplateView.as_view(template_name="success.html"), name='success'), ]
from django.conf.urls import patterns, url from signup.views import (ActivationView, PasswordResetView, PasswordResetConfirmView, SigninView, SignoutView, SignupView, RegistrationPasswordConfirmView) from signup import settings urlpatterns = patterns('', # When the key and/or token are wrong we don't want to give any clue # as to why that is so. Less information communicated to an attacker, # the better. url(r'^activate/(?P<verification_key>%s)/password/(?P<token>.+)/$' % settings.EMAIL_VERIFICATION_PAT, RegistrationPasswordConfirmView.as_view(), name='registration_password_confirm'), url(r'^activate/(?P<verification_key>%s)/$' % settings.EMAIL_VERIFICATION_PAT, ActivationView.as_view(), name='registration_activate'), url(r'^register/$', SignupView.as_view(), name='registration_register'), url(r'^login/recover/', PasswordResetView.as_view(), name='password_reset'), url(r'^login/', SigninView.as_view(), name='login'), url(r'^logout/', SignoutView.as_view(), name='logout'), url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', #pylint: disable=line-too-long PasswordResetConfirmView.as_view(), name='password_reset_confirm'), )