Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Consolidate all django-allauth's URLs

Roland Geider52a53d42a367
diff --git a/wger/core/tests/test_auth_social.py b/wger/core/tests/test_auth_social.py
index 92007b9d8..a79b711e4 100644
--- a/wger/core/tests/test_auth_social.py
+++ b/wger/core/tests/test_auth_social.py
@@ -39,7 +39,7 @@ class _StubProvider:
uses_apps = False
def get_login_url(self, request, **kwargs):
- return '/accounts/wger-social/login/'
+ return '/account/wger-social/login/'
@override_settings(WGER_SOCIAL_PROVIDERS=['wger'])
@@ -59,7 +59,7 @@ class SocialAuthEnabledLoginPageTestCase(WgerTestCase):
# The button must POST (CSRF-safe), not GET.
self.assertContains(
response,
- '<form method="post" action="/accounts/wger-social/login/"',
+ '<form method="post" action="/account/wger-social/login/"',
)
@mock.patch(
diff --git a/wger/core/tests/test_verification.py b/wger/core/tests/test_verification.py
index e7ccf3b3c..6e91525c7 100644
--- a/wger/core/tests/test_verification.py
+++ b/wger/core/tests/test_verification.py
@@ -76,7 +76,7 @@ class EmailVerificationFromAPITestCase(WgerTestCase):
# Extract the confirmation key from the email body
email_body = mail.outbox[0].body
- match = re.search(r'/accounts/confirm-email/([^/\s]+)/', email_body)
+ match = re.search(r'/account/confirm-email/([^/\s]+)/', email_body)
self.assertIsNotNone(match, 'Could not find confirmation link in email body')
key = match.group(1)
diff --git a/wger/urls.py b/wger/urls.py
index 86bdf7588..f52e21d0a 100644
--- a/wger/urls.py
+++ b/wger/urls.py
@@ -289,8 +289,7 @@ urlpatterns = i18n_patterns(
{'sitemaps': sitemaps},
name='django.contrib.sitemaps.views.sitemap',
),
- path('account/', include('allauth.account.urls')),
- path('account/2fa/', include('allauth.mfa.urls')),
+ path('account/', include('allauth.urls')),
)
#
@@ -365,9 +364,6 @@ urlpatterns += [
),
]
-urlpatterns += [
- path('accounts/', include('allauth.urls')),
-]
#
# URL for user uploaded files, served like this during development only