diff --git a/core/views/__init__.py b/core/views/__init__.py index 01d15a1..3452b12 100644 --- a/core/views/__init__.py +++ b/core/views/__init__.py @@ -10,8 +10,23 @@ from core.views.auth import * class IndexView(TemplateView): template_name = f"{settings.EXPEPHALON_FRONTEND}/index.html" + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Home" + return context + class DashboardView(TemplateView): template_name = f"{settings.EXPEPHALON_BACKEND}/index.html" + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Dashboard" + return context + class BackendNotImplementedView(TemplateView): - template_name = f"{settings.EXPEPHALON_BACKEND}/notimplemented.html" \ No newline at end of file + template_name = f"{settings.EXPEPHALON_BACKEND}/notimplemented.html" + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Oops!" + return context \ No newline at end of file diff --git a/core/views/auth.py b/core/views/auth.py index abca065..89290ff 100644 --- a/core/views/auth.py +++ b/core/views/auth.py @@ -18,6 +18,11 @@ class LoginView(FormView): return redirect(request.GET.get("next", "dashboard")) return super().get(request, *args, **kwargs) + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Login" + return context + def form_valid(self, form): user = authenticate(username=form.cleaned_data['email'],password=form.cleaned_data['password']) if user: @@ -59,6 +64,11 @@ class OTPSelectorView(FormView): self.clean_session() return redirect("login") + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Two-Factor Authentication" + return context + class OTPValidatorView(FormView): template_name = f"{settings.EXPEPHALON_BACKEND}/auth/otp_verifier.html" form_class = OTPVerificationForm @@ -107,6 +117,11 @@ class OTPValidatorView(FormView): messages.error(self.request, "Incorrect token entered. Please try again. If the issue persists, contact support to regain access to your account.") return redirect("login") + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Two-Factor Authentication" + return context + class LogoutView(View): def get(self, request, *args, **kwargs): logout(request) diff --git a/core/views/dbsettings.py b/core/views/dbsettings.py index 566cc4d..244a82b 100644 --- a/core/views/dbsettings.py +++ b/core/views/dbsettings.py @@ -9,22 +9,42 @@ try: template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings/index.html" model = Setting + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Database Settings" + return context + class DBSettingsEditView(UpdateView): template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings/update.html" model = Setting success_url = reverse_lazy("dbsettings") fields = ["key", "value"] + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Edit Setting" + return context class DBSettingsDeleteView(DeleteView): template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings/delete.html" model = Setting success_url = reverse_lazy("dbsettings") + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Delete Setting" + return context + class DBSettingsCreateView(CreateView): template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings/create.html" model = Setting success_url = reverse_lazy("dbsettings") fields = ["key", "value"] + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["title"] = "Create Setting" + return context + except ModuleNotFoundError: pass diff --git a/static/backend/images/avatars/1.jpg b/static/backend/images/avatars/1.jpg deleted file mode 100644 index a1b958b..0000000 Binary files a/static/backend/images/avatars/1.jpg and /dev/null differ diff --git a/static/backend/images/avatars/10.jpg b/static/backend/images/avatars/10.jpg deleted file mode 100644 index 49f2458..0000000 Binary files a/static/backend/images/avatars/10.jpg and /dev/null differ diff --git a/static/backend/images/avatars/11.jpg b/static/backend/images/avatars/11.jpg deleted file mode 100644 index c0552b7..0000000 Binary files a/static/backend/images/avatars/11.jpg and /dev/null differ diff --git a/static/backend/images/avatars/12.jpg b/static/backend/images/avatars/12.jpg deleted file mode 100644 index 1a95073..0000000 Binary files a/static/backend/images/avatars/12.jpg and /dev/null differ diff --git a/static/backend/images/avatars/2.jpg b/static/backend/images/avatars/2.jpg deleted file mode 100644 index 1bfb700..0000000 Binary files a/static/backend/images/avatars/2.jpg and /dev/null differ diff --git a/static/backend/images/avatars/3.jpg b/static/backend/images/avatars/3.jpg deleted file mode 100644 index f3a2287..0000000 Binary files a/static/backend/images/avatars/3.jpg and /dev/null differ diff --git a/static/backend/images/avatars/4.jpg b/static/backend/images/avatars/4.jpg deleted file mode 100644 index c327d05..0000000 Binary files a/static/backend/images/avatars/4.jpg and /dev/null differ diff --git a/static/backend/images/avatars/5.jpg b/static/backend/images/avatars/5.jpg deleted file mode 100644 index 342105c..0000000 Binary files a/static/backend/images/avatars/5.jpg and /dev/null differ diff --git a/static/backend/images/avatars/8.jpg b/static/backend/images/avatars/8.jpg deleted file mode 100644 index 0bacf84..0000000 Binary files a/static/backend/images/avatars/8.jpg and /dev/null differ diff --git a/static/backend/images/avatars/9.jpg b/static/backend/images/avatars/9.jpg deleted file mode 100644 index 2d47d8b..0000000 Binary files a/static/backend/images/avatars/9.jpg and /dev/null differ diff --git a/templates/backend/auth/base.html b/templates/backend/auth/base.html index 84f42d3..d9a7e01 100644 --- a/templates/backend/auth/base.html +++ b/templates/backend/auth/base.html @@ -1,4 +1,6 @@ {% load static %} +{% load dbsetting %} +{% dbsetting "core.title" as sitetitle %} @@ -7,10 +9,10 @@ - Login - ArchitectUI HTML Bootstrap 4 Dashboard Template + {% if title %}{{ title }} - {% endif %}{{ sitetitle }} - + @@ -26,10 +28,10 @@
-
-
-

Perfect Balance

-

ArchitectUI is like a dream. Some think it's too good to be true! Extensive collection of unified React Boostrap Components and Elements.

+
+
+

{{ sitetitle }}

+

{{ sitetitle }} is like a dream. Some think it's too good to be true!

diff --git a/templates/backend/base.html b/templates/backend/base.html index 3e98402..ca045ba 100644 --- a/templates/backend/base.html +++ b/templates/backend/base.html @@ -1,5 +1,7 @@ {% load static %} {% load navigation %} +{% load dbsetting %} +{% dbsetting "core.title" as sitetitle %} @@ -8,7 +10,7 @@ - {% if title %}{{ title }} - {% endif %}Expephalon + {% if title %}{{ title }} - {% endif %}{{ sitetitle }} diff --git a/templates/backend/dbsettings/create.html b/templates/backend/dbsettings/create.html index b5c6121..72ccdab 100644 --- a/templates/backend/dbsettings/create.html +++ b/templates/backend/dbsettings/create.html @@ -37,7 +37,7 @@ {% csrf_token %} {% bootstrap_form form %} {% buttons %} - diff --git a/templates/backend/dbsettings/delete.html b/templates/backend/dbsettings/delete.html index e52a164..14fbb00 100644 --- a/templates/backend/dbsettings/delete.html +++ b/templates/backend/dbsettings/delete.html @@ -37,7 +37,7 @@ {% csrf_token %} Are you sure you wish to delete {{ object.key }}? {% buttons %} - diff --git a/templates/backend/dbsettings/update.html b/templates/backend/dbsettings/update.html index 5030baf..f0c11d3 100644 --- a/templates/backend/dbsettings/update.html +++ b/templates/backend/dbsettings/update.html @@ -37,7 +37,7 @@ {% csrf_token %} {% bootstrap_form form %} {% buttons %} -