diff --git a/src/servala/frontend/templates/frontend/index.html b/src/servala/frontend/templates/frontend/index.html new file mode 100644 index 0000000..88cb596 --- /dev/null +++ b/src/servala/frontend/templates/frontend/index.html @@ -0,0 +1 @@ +{% extends "frontend/base.html" %} diff --git a/src/servala/frontend/templates/frontend/profile.html b/src/servala/frontend/templates/frontend/profile.html new file mode 100644 index 0000000..a5f0e62 --- /dev/null +++ b/src/servala/frontend/templates/frontend/profile.html @@ -0,0 +1,43 @@ +{% extends "frontend/base.html" %} +{% load i18n %} +{% block html_title %} + {% block page_title %} + {% translate "Profile" %} + {% endblock page_title %} +{% endblock html_title %} +{% block content %} +
+
+
+

{% translate "Account" %}

+
+
+
+

+ {% blocktranslate trimmed %} + You are logged in with your VSHN user account. You will be able to change your password and other settings here in the future. + {% endblocktranslate %} +

+
+ + + + + + + + + + + + + + + +
{% translate "E-mail" %}{{ request.user.email }}
{% translate "First name" %}{{ request.user.first_name }}
{% translate "Last name" %}{{ request.user.last_name }}
+
+
+
+
+
+{% endblock content %} diff --git a/src/servala/frontend/views.py b/src/servala/frontend/views.py index 5bcd55c..8b0271e 100644 --- a/src/servala/frontend/views.py +++ b/src/servala/frontend/views.py @@ -2,4 +2,8 @@ from django.views.generic import TemplateView class IndexView(TemplateView): - template_name = "frontend/base.html" + template_name = "frontend/index.html" + + +class ProfileView(TemplateView): + template_name = "frontend/profile.html" diff --git a/src/servala/urls.py b/src/servala/urls.py index 8b31dd5..38cebb2 100644 --- a/src/servala/urls.py +++ b/src/servala/urls.py @@ -2,17 +2,23 @@ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path +from django.urls.conf import include from django.utils.translation import gettext_lazy as _ -from servala.frontend.views import IndexView +from servala.frontend import views admin.site.site_title = _("Servala Admin") admin.site.site_header = _("Servala Management") admin.site.index_title = _("Dashboard") urlpatterns = [ - path("", IndexView.as_view(), name="index"), + # This adds the allauth urls to the project: + # - accounts/keycloak/login/ + # - accounts/keycloak/login/callback/ + path("accounts/", include("allauth.urls")), + path("accounts/profile/", views.ProfileView.as_view(), name="profile"), path("admin/", admin.site.urls), + path("", views.IndexView.as_view(), name="index"), ] # Serve static and media files in development