diff --git a/core/views/auth.py b/core/views/auth.py index f97d59e..abca065 100644 --- a/core/views/auth.py +++ b/core/views/auth.py @@ -10,7 +10,7 @@ from core.models.otp import LoginSession from core.helpers.otp import get_user_otps, get_otp_choices, get_otp_by_name class LoginView(FormView): - template_name = f"{settings.EXPEPHALON_BACKEND}/login.html" + template_name = f"{settings.EXPEPHALON_BACKEND}/auth/login.html" form_class = LoginForm def get(self, request, *args, **kwargs): @@ -31,7 +31,7 @@ class LoginView(FormView): return super().form_invalid(form) class OTPSelectorView(FormView): - template_name = f"{settings.EXPEPHALON_BACKEND}/otp_selector.html" + template_name = f"{settings.EXPEPHALON_BACKEND}/auth/otp_selector.html" form_class = OTPSelectorForm def clean_session(self): @@ -60,7 +60,7 @@ class OTPSelectorView(FormView): return redirect("login") class OTPValidatorView(FormView): - template_name = f"{settings.EXPEPHALON_BACKEND}/otp_verifier.html" + template_name = f"{settings.EXPEPHALON_BACKEND}/auth/otp_verifier.html" form_class = OTPVerificationForm def clean_session(self): diff --git a/core/views/dbsettings.py b/core/views/dbsettings.py index ad0ca0e..566cc4d 100644 --- a/core/views/dbsettings.py +++ b/core/views/dbsettings.py @@ -6,22 +6,22 @@ try: from dbsettings.models import Setting class DBSettingsListView(ListView): - template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings.html" + template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings/index.html" model = Setting class DBSettingsEditView(UpdateView): - template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings_update.html" + template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings/update.html" model = Setting success_url = reverse_lazy("dbsettings") fields = ["key", "value"] class DBSettingsDeleteView(DeleteView): - template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings_delete.html" + template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings/delete.html" model = Setting success_url = reverse_lazy("dbsettings") class DBSettingsCreateView(CreateView): - template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings_create.html" + template_name = f"{settings.EXPEPHALON_BACKEND}/dbsettings/create.html" model = Setting success_url = reverse_lazy("dbsettings") fields = ["key", "value"] diff --git a/templates/backend/auth_base.html b/templates/backend/auth/base.html similarity index 100% rename from templates/backend/auth_base.html rename to templates/backend/auth/base.html diff --git a/templates/backend/login.html b/templates/backend/auth/login.html similarity index 97% rename from templates/backend/login.html rename to templates/backend/auth/login.html index 995e013..309a28f 100644 --- a/templates/backend/login.html +++ b/templates/backend/auth/login.html @@ -1,4 +1,4 @@ -{% extends "backend/auth_base.html" %} +{% extends "backend/auth/base.html" %} {% load bootstrap4 %} {% block content %}