diff --git a/attendio/settings.py b/attendio/settings.py index 7ed42f9380e3e937f65d9f0e1d6743741bbbe300..3d97daf57fcf217a8485b7f919ee52d75075cc95 100644 --- a/attendio/settings.py +++ b/attendio/settings.py @@ -140,7 +140,8 @@ STATIC_URL = 'static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' BOOTSTRAP5 = { - # "theme_url": "https://bootswatch.com/5/vapor/bootstrap.min.css" + # "theme_url": "https://bootswatch.com/5/vapor/bootstrap.min.css", + "color_mode": "dark", } MFA_SUPPORTED_TYPES = ["totp", "webauthn", "recovery_codes"] diff --git a/attendio/urls.py b/attendio/urls.py index a2a61d8a6f4714e0f4345f44eea9913b64803263..9272d889b7427c068c677c9d9e3b8885d3d900a6 100644 --- a/attendio/urls.py +++ b/attendio/urls.py @@ -14,11 +14,17 @@ 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 allauth.account.decorators import secure_admin_login from django.contrib import admin from django.urls import path, include +from django.views.generic import TemplateView + +admin.autodiscover() +admin.site.login = secure_admin_login(admin.site.login) urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls')), + path("accounts/profile/", TemplateView.as_view(template_name="profile.html")), path("", include("publicweb.urls")), ] diff --git a/publicweb/urls.py b/publicweb/urls.py index c8344e74b63b2d47e4818e767972956e7c899f8a..2acf6cc3b839949f2e92e170e0390a6bad7533f3 100644 --- a/publicweb/urls.py +++ b/publicweb/urls.py @@ -1,7 +1,8 @@ from django.urls import path +from django.views.generic import TemplateView from publicweb import views urlpatterns = [ - path("", views.index, name="index"), + path("", TemplateView.as_view(template_name="pub/index.html"), name="index"), ] \ No newline at end of file diff --git a/publicweb/views.py b/publicweb/views.py index 7dd0aec7f7769275b28b4aa07b57859a9fc47e52..7e324b4a938f1fd6eea8a62b0543c568a29f10a4 100644 --- a/publicweb/views.py +++ b/publicweb/views.py @@ -1,4 +1 @@ -from django.shortcuts import render - -def index(request): - return render(request, 'pub/index.html') \ No newline at end of file +# Views go here diff --git a/templates/allauth/elements/form.html b/templates/allauth/elements/form.html index aef76146461accf695ea94eb2aaf4cc745ae3183..d087e862e826b586d4b4f764eb391250481ce9b0 100644 --- a/templates/allauth/elements/form.html +++ b/templates/allauth/elements/form.html @@ -12,3 +12,4 @@ {% endslot %} {% if not attrs.no_visible_fields %}</div>{% endif %} </form> +<br> \ No newline at end of file diff --git a/templates/allauth/layouts/base.html b/templates/allauth/layouts/base.html index 29c3ffb8aaecfb8b920ddd97a5fe054a3009477e..7b40d950ce965a5f8d1ddabbafcebb5f235e4d95 100644 --- a/templates/allauth/layouts/base.html +++ b/templates/allauth/layouts/base.html @@ -7,8 +7,6 @@ <div class="container"> <br> - {% autoescape off %}{% bootstrap_messages %}{% endautoescape %} - {% block body %} {% block content %} {% endblock content %} diff --git a/templates/app/base.html b/templates/app/base.html index f383d258faf19331a7646e9e88fd7b17b4e33d29..0f21b8d1af67d9463c1e38b55c2c5a9714058c27 100644 --- a/templates/app/base.html +++ b/templates/app/base.html @@ -4,7 +4,7 @@ {% block bootstrap5_before_content %} <a class="visually-hidden-focusable" href="#content">Skip to main content</a> - <header data-bs-theme="dark"> + <header> <nav class="navbar navbar-expand-lg bg-body-tertiary"> <div class="container-fluid"> <a class="navbar-brand" href="{% url "index" %}">attendio</a> @@ -36,7 +36,7 @@ <a href="{% if email_url_ %}{{ email_url_ }}{% else %}{{ socialaccount_url_ }}{% endif %}" class="btn btn-secondary">Manage Account</a> {% endif %} - <a href="{% url 'account_logout' %}" class="btn btn-danger">Sign Out}</a> + <a href="{% url 'account_logout' %}" class="btn btn-danger">Sign Out</a> {% else %} <a href="{% url 'account_login' %}" class="btn btn-outline-light">Sign In</a> {% url 'account_signup' as signup_url_ %} @@ -56,7 +56,7 @@ <div class="container"> <br> <h1>{% block title %}(no title){% endblock %}</h1> - + {% autoescape off %}{% bootstrap_messages %}{% endautoescape %} {% block content %}