django-devbar 0.1.2__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_devbar-0.1.2 → django_devbar-0.1.3}/PKG-INFO +1 -1
- {django_devbar-0.1.2 → django_devbar-0.1.3}/pyproject.toml +1 -1
- {django_devbar-0.1.2 → django_devbar-0.1.3}/src/django_devbar/__init__.py +1 -1
- {django_devbar-0.1.2 → django_devbar-0.1.3}/src/django_devbar/middleware.py +15 -12
- {django_devbar-0.1.2 → django_devbar-0.1.3}/README.md +0 -0
- {django_devbar-0.1.2 → django_devbar-0.1.3}/src/django_devbar/conf.py +0 -0
- {django_devbar-0.1.2 → django_devbar-0.1.3}/src/django_devbar/tracker.py +0 -0
|
@@ -16,28 +16,31 @@ from .conf import (
|
|
|
16
16
|
|
|
17
17
|
STYLE_BLOCK = """<style>
|
|
18
18
|
#django-devbar {
|
|
19
|
-
position: fixed; %s; z-index:
|
|
19
|
+
position: fixed; %s; z-index: 999999999;
|
|
20
|
+
display: flex; align-items: center; gap: 5px;
|
|
20
21
|
font-family: -apple-system, system-ui, sans-serif;
|
|
21
22
|
font-size: 11px; font-weight: 500;
|
|
22
|
-
padding: 4px 8px; border-radius: 4px;
|
|
23
|
-
backdrop-filter: blur(
|
|
24
|
-
box-shadow: 0 2px
|
|
23
|
+
padding: 4px 8px; margin: 8px; border-radius: 4px;
|
|
24
|
+
backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
|
|
25
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.2);
|
|
25
26
|
transition: all 0.2s ease;
|
|
26
27
|
cursor: default;
|
|
27
28
|
line-height: 1.3;
|
|
28
|
-
background: rgba(20, 20, 20, 0.
|
|
29
|
-
color: #
|
|
29
|
+
background: rgba(20, 20, 20, 0.92);
|
|
30
|
+
color: #f5f5f5;
|
|
30
31
|
}
|
|
31
32
|
#django-devbar.level-warn { border-left: 3px solid #f59e0b; }
|
|
32
33
|
#django-devbar.level-crit { border-left: 3px solid #dc2626; }
|
|
33
|
-
#django-devbar span { opacity: 0.7;
|
|
34
|
-
#django-devbar strong { opacity: 1; font-weight: 600;
|
|
34
|
+
#django-devbar span { opacity: 0.7; }
|
|
35
|
+
#django-devbar strong { opacity: 1; font-weight: 600; }
|
|
36
|
+
#django-devbar .duplicate-badge { color: #f59e0b; font-weight: 600; }
|
|
37
|
+
@media (max-width: 640px) { #django-devbar { display: none; } }
|
|
35
38
|
</style>"""
|
|
36
39
|
|
|
37
40
|
BAR_TEMPLATE = """<div id="django-devbar" class="level-%s">
|
|
38
|
-
<span>db</span> <strong>%.0fms</strong>
|
|
39
|
-
<span>
|
|
40
|
-
<span>
|
|
41
|
+
<span>db</span> <strong>%.0fms</strong> <span>·</span>
|
|
42
|
+
<span>app</span> <strong>%.0fms</strong> <span>·</span>
|
|
43
|
+
<span>queries</span> <strong>%d</strong>%s
|
|
41
44
|
</div>"""
|
|
42
45
|
|
|
43
46
|
SCRIPT_TEMPLATE = """<script>
|
|
@@ -127,7 +130,7 @@ class DevBarMiddleware:
|
|
|
127
130
|
return
|
|
128
131
|
|
|
129
132
|
dup_marker = (
|
|
130
|
-
' <strong
|
|
133
|
+
' <strong class="duplicate-badge">(d)</strong>'
|
|
131
134
|
if stats["has_duplicates"]
|
|
132
135
|
else ""
|
|
133
136
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|