diff --git a/src/bornhack/urls.py b/src/bornhack/urls.py index ba387fc6..9b411f1f 100644 --- a/src/bornhack/urls.py +++ b/src/bornhack/urls.py @@ -19,10 +19,9 @@ from villages.views import * admin.site.login = login_required(admin.site.login) urlpatterns = [ - path( - 'profile/', - include('profiles.urls', namespace='profiles') - ), + path('profile/', include('allauth.urls')), + path('profile/', include('allauth_2fa.urls')), + path('profile/', include('profiles.urls', namespace='profiles')), path( 'tickets/', include('tickets.urls', namespace='tickets') @@ -65,8 +64,6 @@ urlpatterns = [ TemplateView.as_view(template_name='legal/general_terms_and_conditions.html'), name='general-terms' ), - path('accounts/', include('allauth.urls')), - path('accounts/', include('allauth_2fa.urls')), path('admin/', admin.site.urls), # We don't need CSRF checks for the API diff --git a/src/profiles/models.py b/src/profiles/models.py index 986ea120..44a2af88 100644 --- a/src/profiles/models.py +++ b/src/profiles/models.py @@ -1,12 +1,7 @@ from django.contrib.auth.models import User from django.db import models -from django.conf import settings -from django.utils import timezone -from django.dispatch import receiver from django.utils.translation import ugettext_lazy as _ -from datetime import timedelta - from utils.models import UUIDModel, CreatedUpdatedModel diff --git a/src/profiles/templates/account/email.html b/src/profiles/templates/account/email.html index 743d9c4d..998d1b98 100644 --- a/src/profiles/templates/account/email.html +++ b/src/profiles/templates/account/email.html @@ -1,76 +1,105 @@ {% extends 'profile_base.html' %} -{% load i18n %} {% load bootstrap3 %} -{% block head_title %}{% trans "Account" %}{% endblock %} - {% block profile_content %} -
-
+
+
-

{% trans "E-mail Addresses" %}

-{% if user.emailaddress_set.all %} -

{% trans 'The following e-mail addresses are associated with your account:' %}

+
+
+

E-mail Addresses

+
+
- + + {% else %} +

+ Warning: You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc. +

+ {% endif %} +
+
-{% else %} -

{% trans 'Warning:'%} {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}

+
+
+

Add E-mail Address

+
+
+
+ {% csrf_token %} + {% bootstrap_form form %} + +
+
+
-{% endif %} - - -

{% trans "Add E-mail Address" %}

- -
- {% csrf_token %} - {% bootstrap_form form %} - -
+