mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-16 09:54:51 +03:00
Add django-browser-reload
This commit is contained in:
parent
937c4cc31a
commit
4c15d0ff86
|
@ -53,9 +53,12 @@ INSTALLED_APPS = ["whitenoise.runserver_nostatic"] + INSTALLED_APPS # noqa F405
|
||||||
# django-debug-toolbar
|
# django-debug-toolbar
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#prerequisites
|
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#prerequisites
|
||||||
INSTALLED_APPS += ["debug_toolbar"] # noqa F405
|
INSTALLED_APPS += ["debug_toolbar", "django_browser_reload"] # noqa F405
|
||||||
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#middleware
|
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#middleware
|
||||||
MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] # noqa F405
|
MIDDLEWARE += [
|
||||||
|
"debug_toolbar.middleware.DebugToolbarMiddleware",
|
||||||
|
"django_browser_reload.middleware.BrowserReloadMiddleware",
|
||||||
|
] # noqa F405
|
||||||
# https://django-debug-toolbar.readthedocs.io/en/latest/configuration.html#debug-toolbar-config
|
# https://django-debug-toolbar.readthedocs.io/en/latest/configuration.html#debug-toolbar-config
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
"DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
|
"DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
|
||||||
|
|
|
@ -69,4 +69,7 @@ if settings.DEBUG:
|
||||||
if "debug_toolbar" in settings.INSTALLED_APPS:
|
if "debug_toolbar" in settings.INSTALLED_APPS:
|
||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
|
|
||||||
urlpatterns = [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns
|
urlpatterns = [
|
||||||
|
path("__debug__/", include(debug_toolbar.urls)),
|
||||||
|
path("__reload__/", include("django_browser_reload.urls")),
|
||||||
|
] + urlpatterns
|
||||||
|
|
|
@ -46,3 +46,4 @@ django-debug-toolbar==3.4.0 # https://github.com/jazzband/django-debug-toolbar
|
||||||
django-extensions==3.1.5 # https://github.com/django-extensions/django-extensions
|
django-extensions==3.1.5 # https://github.com/django-extensions/django-extensions
|
||||||
django-coverage-plugin==2.0.3 # https://github.com/nedbat/django_coverage_plugin
|
django-coverage-plugin==2.0.3 # https://github.com/nedbat/django_coverage_plugin
|
||||||
pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django
|
pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django
|
||||||
|
django-browser-reload==1.6.0 # https://github.com/adamchainz/django-browser-reload
|
||||||
|
|
Loading…
Reference in New Issue
Block a user