Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ pip install django-plugin-django-debug-toolbar
Looking at [Django Debug Toolbar's installation instructions](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html), this plugin takes care of the following steps (using their numbering):

- [#1. Install the Package](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#install-the-package)
- [#2. Check for Prerequisites](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#check-for-prerequisites)
- setup `django.contrib.staticfiles`
- [#3. Install the App](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#install-the-app)
- [#4. Add the URLs](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#add-the-urls)
- [#5. Add the Middleware](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#add-the-middleware)
Expand All @@ -35,7 +37,7 @@ Looking at [Django Debug Toolbar's installation instructions](https://django-deb
But you still need to:

- [#2. Check for Prerequisites](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#check-for-prerequisites)
- like settings for static files and templates
- like settings for templates
- [#6. Configure Internal IPs](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#configure-internal-ips)
- if you require IPs other than `127.0.0.1`, set them in `INTERNAL_IPS` in your settings
- [#7. Disable the toolbar when running tests (optional)](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#disable-the-toolbar-when-running-tests-optional)
Expand Down
4 changes: 3 additions & 1 deletion django_plugin_django_debug_toolbar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@djp.hookimpl
def installed_apps():
return ["debug_toolbar"]
return ["django.contrib.staticfiles", "debug_toolbar"]


@djp.hookimpl
Expand All @@ -19,6 +19,8 @@ def settings(current_settings):
# Debug Toolbar will only display when DEBUG = True
current_settings["DEBUG"] = True

current_settings.setdefault("STATIC_URL", "static/")

current_settings["MIDDLEWARE"] = inject_middleware(current_settings["MIDDLEWARE"])


Expand Down
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "django-plugin-django-debug-toolbar"
version = "0.4.2"
version = "0.5.1"
description = "Django plugin that configures the Django Debug Toolbar"
readme = "README.md"
authors = [{name = "Tom Viner"}]
Expand Down Expand Up @@ -36,6 +36,14 @@ test = [
"typos",
]

[build-system]
requires = ["uv_build"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-root = ""


[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.test_project.settings"
pythonpath = ["."]
Expand Down