mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-08-23 18:31:43 +02:00
Add an additionnal panel to the admin status displaying if DEBUG is turned on
This commit is contained in:
parent
34b94ae685
commit
0d9fd0049b
@ -245,6 +245,7 @@ CACHES = {
|
||||
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
||||
|
||||
DEBUG = True
|
||||
DISPLAY_DEBUG = True
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
DATABASES = {
|
||||
"default": {
|
||||
|
@ -118,6 +118,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if debug %}
|
||||
<div id="aa-dashboard-panel-debug" class="col-12 mb-3">
|
||||
<div class="card text-bg-warning">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{% translate "Debug mode" %}</h5>
|
||||
<p class="card-text">
|
||||
{% translate "Debug mode is currently turned on. Make sure to turn it off as soon as you are finished testing" %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<script>
|
||||
const elemRunning = document.getElementById("task-counts");
|
||||
const elemQueued = document.getElementById("queued-tasks-count");
|
||||
|
@ -52,6 +52,7 @@ def status_overview() -> dict:
|
||||
"tasks_total": 0,
|
||||
"tasks_hours": 0,
|
||||
"earliest_task": None,
|
||||
"debug": settings.DEBUG if settings.DISPLAY_DEBUG else False,
|
||||
}
|
||||
response.update(_current_notifications())
|
||||
response.update(_current_version_summary())
|
||||
|
@ -237,6 +237,7 @@ There are two Django settings files: ``base.py`` and ``local.py``. The base sett
|
||||
|
||||
```python
|
||||
DEBUG = True
|
||||
DISPLAY_DEBUG = False
|
||||
```
|
||||
|
||||
Define URL and name of your site:
|
||||
|
Loading…
x
Reference in New Issue
Block a user