|
16 | 16 |
|
17 | 17 | from .views import password_change, password_change_success |
18 | 18 |
|
19 | | -redirect_view = RedirectView.as_view(url=reverse_lazy('admin:index')) |
| 19 | +redirect_view = RedirectView.as_view(url=reverse_lazy("admin:index")) |
20 | 20 |
|
21 | 21 |
|
22 | 22 | urlpatterns = [ |
23 | | - path('signup/', redirect_view, name='account_signup'), |
24 | | - path('login/', views.login, name='account_login'), |
25 | | - path('logout/', views.logout, name='account_logout'), |
26 | | - path('inactive/', views.account_inactive, name='account_inactive'), |
| 23 | + path("signup/", redirect_view, name="account_signup"), |
| 24 | + path("login/", views.login, name="account_login"), |
| 25 | + path("logout/", views.logout, name="account_logout"), |
| 26 | + path("inactive/", views.account_inactive, name="account_inactive"), |
27 | 27 | # E-mail |
28 | 28 | path( |
29 | | - 'confirm-email/', |
| 29 | + "confirm-email/", |
30 | 30 | views.email_verification_sent, |
31 | | - name='account_email_verification_sent', |
| 31 | + name="account_email_verification_sent", |
32 | 32 | ), |
33 | 33 | re_path( |
34 | | - r'^confirm-email/(?P<key>[-:\w]+)/$', |
| 34 | + r"^confirm-email/(?P<key>[-:\w]+)/$", |
35 | 35 | views.confirm_email, |
36 | | - name='account_confirm_email', |
| 36 | + name="account_confirm_email", |
37 | 37 | ), |
38 | 38 | # password change |
39 | 39 | path( |
40 | | - 'password/change/', |
| 40 | + "password/change/", |
41 | 41 | password_change, |
42 | 42 | name="account_change_password", |
43 | 43 | ), |
44 | 44 | path( |
45 | | - 'password/change/success/', |
| 45 | + "password/change/success/", |
46 | 46 | password_change_success, |
47 | | - name='account_change_password_success', |
| 47 | + name="account_change_password_success", |
48 | 48 | ), |
49 | 49 | # password reset |
50 | | - path('password/reset/', views.password_reset, name='account_reset_password'), |
| 50 | + path("password/reset/", views.password_reset, name="account_reset_password"), |
51 | 51 | path( |
52 | | - 'password/reset/done/', |
| 52 | + "password/reset/done/", |
53 | 53 | views.password_reset_done, |
54 | | - name='account_reset_password_done', |
| 54 | + name="account_reset_password_done", |
55 | 55 | ), |
56 | 56 | re_path( |
57 | | - r'^password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$', |
| 57 | + r"^password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$", |
58 | 58 | views.password_reset_from_key, |
59 | | - name='account_reset_password_from_key', |
| 59 | + name="account_reset_password_from_key", |
60 | 60 | ), |
61 | 61 | path( |
62 | | - 'password/reset/key/done/', |
| 62 | + "password/reset/key/done/", |
63 | 63 | views.password_reset_from_key_done, |
64 | | - name='account_reset_password_from_key_done', |
| 64 | + name="account_reset_password_from_key_done", |
65 | 65 | ), |
66 | 66 | path( |
67 | | - 'email-verification-success/', |
68 | | - TemplateView.as_view(template_name='account/email_verification_success.html'), |
69 | | - name='email_confirmation_success', |
| 67 | + "email-verification-success/", |
| 68 | + TemplateView.as_view(template_name="account/email_verification_success.html"), |
| 69 | + name="email_confirmation_success", |
70 | 70 | ), |
71 | 71 | path( |
72 | | - 'logout-success/', |
73 | | - TemplateView.as_view(template_name='account/logout_success.html'), |
74 | | - name='logout_success', |
| 72 | + "logout-success/", |
| 73 | + TemplateView.as_view(template_name="account/logout_success.html"), |
| 74 | + name="logout_success", |
75 | 75 | ), |
76 | 76 | ] |
77 | 77 |
|
78 | 78 | if app_settings.SOCIALACCOUNT_ENABLED: |
79 | | - urlpatterns += [path('social/', include('allauth.socialaccount.urls'))] |
| 79 | + urlpatterns += [path("social/", include("allauth.socialaccount.urls"))] |
80 | 80 |
|
81 | 81 | for provider in providers.registry.get_class_list(): |
82 | 82 | try: |
83 | | - prov_mod = import_module(provider.get_package() + '.urls') |
| 83 | + prov_mod = import_module(provider.get_package() + ".urls") |
84 | 84 | except ImportError: |
85 | 85 | continue |
86 | | - prov_urlpatterns = getattr(prov_mod, 'urlpatterns', None) |
| 86 | + prov_urlpatterns = getattr(prov_mod, "urlpatterns", None) |
87 | 87 | if prov_urlpatterns: |
88 | 88 | urlpatterns += prov_urlpatterns |
0 commit comments