mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-08-24 19:01:42 +02:00
Merge branch 'debug-panel' into 'master'
Add an additionnal panel to the admin status displaying if DEBUG is turned on See merge request allianceauth/allianceauth!1737
This commit is contained in:
commit
2bcdaabb14
@ -245,6 +245,7 @@ CACHES = {
|
|||||||
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
DISPLAY_DEBUG = True
|
||||||
ALLOWED_HOSTS = ["*"]
|
ALLOWED_HOSTS = ["*"]
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": {
|
"default": {
|
||||||
|
@ -118,6 +118,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
<script>
|
||||||
const elemRunning = document.getElementById("task-counts");
|
const elemRunning = document.getElementById("task-counts");
|
||||||
const elemQueued = document.getElementById("queued-tasks-count");
|
const elemQueued = document.getElementById("queued-tasks-count");
|
||||||
|
@ -52,6 +52,7 @@ def status_overview() -> dict:
|
|||||||
"tasks_total": 0,
|
"tasks_total": 0,
|
||||||
"tasks_hours": 0,
|
"tasks_hours": 0,
|
||||||
"earliest_task": None,
|
"earliest_task": None,
|
||||||
|
"debug": settings.DEBUG if settings.DISPLAY_DEBUG else False,
|
||||||
}
|
}
|
||||||
response.update(_current_notifications())
|
response.update(_current_notifications())
|
||||||
response.update(_current_version_summary())
|
response.update(_current_version_summary())
|
||||||
|
@ -236,6 +236,7 @@ There are two Django settings files: ``base.py`` and ``local.py``. The base sett
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
DISPLAY_DEBUG = False
|
||||||
```
|
```
|
||||||
|
|
||||||
Define URL and name of your site:
|
Define URL and name of your site:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user