feat(dev): Add DjDT

This commit is contained in:
Tom Hubrecht 2024-05-27 09:05:29 +02:00
parent 9e45426202
commit e2d6371495
4 changed files with 10 additions and 2 deletions

View file

@ -42,6 +42,7 @@ in
ps.django
ps.django-allauth
ps.django-compressor
ps.django-debug-toolbar
ps.django-types
ps.loadcredential
]

View file

@ -160,9 +160,15 @@ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
if DEBUG:
INSTALLED_APPS += [
"debug_toolbar",
"django_browser_reload",
]
MIDDLEWARE += [
"debug_toolbar.middleware.DebugToolbarMiddleware",
"django_browser_reload.middleware.BrowserReloadMiddleware",
]
INTERNAL_IPS = ["127.0.0.1"]
DEBUG_TOOLBAR_CONFIG = {"INSERT_BEFORE": "</footer>"}

View file

@ -29,4 +29,5 @@ if settings.DEBUG:
urlpatterns += [
path("admin/", admin.site.urls),
path("__reload__/", include("django_browser_reload.urls")),
path("__debug__/", include("debug_toolbar.urls")),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

View file

@ -49,8 +49,8 @@
</section>
<footer class="footer has-text-centered">
Logiciel développé pour et par la <a href="https://dgnum.eu">DGNum</a>.
<b>Logiciel développé pour et par la <a href="https://dgnum.eu">DGNum</a>.</b>
{% django_browser_reload_script %}
</footer>
{% django_browser_reload_script %}
</body>
</html>