Restructuring templates
This commit is contained in:
parent
7708128255
commit
a1ba9318ad
9 changed files with 16 additions and 16 deletions
|
@ -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):
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "backend/auth_base.html" %}
|
||||
{% extends "backend/auth/base.html" %}
|
||||
{% load bootstrap4 %}
|
||||
{% block content %}
|
||||
<div class="mx-auto app-login-box col-sm-12 col-md-10 col-lg-9">
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "backend/auth_base.html" %}
|
||||
{% extends "backend/auth/base.html" %}
|
||||
{% load bootstrap4 %}
|
||||
{% block content %}
|
||||
<div class="mx-auto app-login-box col-sm-12 col-md-10 col-lg-9">
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "backend/auth_base.html" %}
|
||||
{% extends "backend/auth/base.html" %}
|
||||
{% load bootstrap4 %}
|
||||
{% block content %}
|
||||
<div class="mx-auto app-login-box col-sm-12 col-md-10 col-lg-9">
|
|
@ -8,7 +8,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Analytics Dashboard - This is an example dashboard created using build-in elements and components.</title>
|
||||
<title>{% if title %}{{ title }} - {% endif %}Expephalon</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
|
||||
<meta name="description" content="This is an example dashboard created using build-in elements and components.">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<i class="fa fa-database">
|
||||
</i>
|
||||
</div>
|
||||
<div>Database Settings - Edit Setting
|
||||
<div class="page-title-subheading">Edit key and value of a setting
|
||||
<div>Database Settings - Delete Setting
|
||||
<div class="page-title-subheading">Delete a setting from the system
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<div class="card-header-tab card-header-tab-animation card-header">
|
||||
<div class="card-header-title">
|
||||
<i class="header-icon lnr-apartment icon-gradient bg-love-kiss"> </i>
|
||||
Deleting {{ form.key.value }}
|
||||
Deleting {{ object.key }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
@ -35,7 +35,7 @@
|
|||
<div class="tab-pane fade show active" id="tabs-eg-77">
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
Are you sure you wish to delete {{ form.key.value }}?
|
||||
Are you sure you wish to delete {{ object.key }}?
|
||||
{% buttons %}
|
||||
<button type="button" class="btn-shadow mr-3 btn btn-success">
|
||||
<i class="fa fa-check"></i> Save
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<tr>
|
||||
<th scope="row">{{ setting.key }}</th>
|
||||
<td><a href="javascript:alert('{{ setting.value }}');">Click to display...</a></td>
|
||||
<td><a href="{% url "dbsettings_edit" setting.key %}"><i class="fas fa-edit" title="Edit Setting"></i></a> <a href="#"><i style="color: darkred;" onclick="askdelete(20);" class="fas fa-trash-alt" title="Delete Setting"></i></a></td>
|
||||
<td><a href="{% url "dbsettings_edit" setting.key %}"><i class="fas fa-edit" title="Edit Setting"></i></a> <a href="{% url "dbsettings_delete" setting.key %}"><i style="color: darkred;" class="fas fa-trash-alt" title="Delete Setting"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue