Skip to content
Snippets Groups Projects
Verified Commit 654d0c39 authored by TheJoeCoder's avatar TheJoeCoder
Browse files

Fix layouts and urls

parent 95296115
Branches
No related tags found
No related merge requests found
......@@ -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"]
......
......@@ -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")),
]
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
from django.shortcuts import render
def index(request):
return render(request, 'pub/index.html')
\ No newline at end of file
# Views go here
......@@ -12,3 +12,4 @@
{% endslot %}
{% if not attrs.no_visible_fields %}</div>{% endif %}
</form>
<br>
\ No newline at end of file
......@@ -7,8 +7,6 @@
<div class="container">
<br>
{% autoescape off %}{% bootstrap_messages %}{% endautoescape %}
{% block body %}
{% block content %}
{% endblock content %}
......
......@@ -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_ %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment