mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-16 19:44:08 +02:00
add django-requests-tracker
This commit is contained in:
@@ -173,6 +173,17 @@ if DEBUG_TOOLBAR:
|
|||||||
]
|
]
|
||||||
MIDDLEWARE = [*MIDDLEWARE, 'debug_toolbar.middleware.DebugToolbarMiddleware']
|
MIDDLEWARE = [*MIDDLEWARE, 'debug_toolbar.middleware.DebugToolbarMiddleware']
|
||||||
|
|
||||||
|
|
||||||
|
# https://github.com/bensi94/Django-Requests-Tracker (improved version of django-debug-toolbar)
|
||||||
|
# Must delete archivebox/templates/admin to use because it relies on some things we override
|
||||||
|
# visit /__requests_tracker__/ to access
|
||||||
|
DEBUG_REQUESTS_TRACKER = False
|
||||||
|
if DEBUG_REQUESTS_TRACKER:
|
||||||
|
INSTALLED_APPS += ["requests_tracker"]
|
||||||
|
MIDDLEWARE += ["requests_tracker.middleware.requests_tracker_middleware"]
|
||||||
|
INTERNAL_IPS = ["127.0.0.1", "10.0.2.2", "0.0.0.0", "*"]
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### Staticfile and Template Settings
|
### Staticfile and Template Settings
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@@ -52,10 +52,10 @@ urlpatterns = [
|
|||||||
urlpatterns += staticfiles_urlpatterns()
|
urlpatterns += staticfiles_urlpatterns()
|
||||||
|
|
||||||
if settings.DEBUG_TOOLBAR:
|
if settings.DEBUG_TOOLBAR:
|
||||||
import debug_toolbar
|
urlpatterns += [path('__debug__/', include("debug_toolbar.urls"))]
|
||||||
urlpatterns += [
|
|
||||||
path('__debug__/', include(debug_toolbar.urls)),
|
if settings.DEBUG_REQUESTS_TRACKER:
|
||||||
]
|
urlpatterns += [path("__requests_tracker__/", include("requests_tracker.urls"))]
|
||||||
|
|
||||||
|
|
||||||
# # Proposed FUTURE URLs spec
|
# # Proposed FUTURE URLs spec
|
||||||
|
2
pdm.lock
generated
2
pdm.lock
generated
@@ -5,7 +5,7 @@
|
|||||||
groups = ["default", "ldap", "sonic"]
|
groups = ["default", "ldap", "sonic"]
|
||||||
strategy = ["cross_platform", "inherit_metadata"]
|
strategy = ["cross_platform", "inherit_metadata"]
|
||||||
lock_version = "4.4.1"
|
lock_version = "4.4.1"
|
||||||
content_hash = "sha256:680d048f6c24c4b822829a9a4bd5d4ce235bfde2f8c58fd531cd434e4cf3ee13"
|
content_hash = "sha256:0d6b1cd72f1893512e04c3b47f81666243bd4f91afe46fabc15b303284a3cc74"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "annotated-types"
|
name = "annotated-types"
|
||||||
|
@@ -109,6 +109,7 @@ debug = [
|
|||||||
"django-debug-toolbar",
|
"django-debug-toolbar",
|
||||||
"djdt_flamegraph",
|
"djdt_flamegraph",
|
||||||
"ipdb",
|
"ipdb",
|
||||||
|
"requests-tracker>=0.3.3",
|
||||||
]
|
]
|
||||||
test = [
|
test = [
|
||||||
"pytest",
|
"pytest",
|
||||||
@@ -119,6 +120,12 @@ lint = [
|
|||||||
"django-stubs",
|
"django-stubs",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.pdm.scripts]
|
||||||
|
lint = "./bin/lint.sh"
|
||||||
|
test = "./bin/test.sh"
|
||||||
|
# all = {composite = ["lint mypackage/", "test -v tests/"]}
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["pdm-backend"]
|
requires = ["pdm-backend"]
|
||||||
build-backend = "pdm.backend"
|
build-backend = "pdm.backend"
|
||||||
@@ -127,11 +134,6 @@ build-backend = "pdm.backend"
|
|||||||
archivebox = "archivebox.cli:main"
|
archivebox = "archivebox.cli:main"
|
||||||
|
|
||||||
|
|
||||||
[tool.pdm.scripts]
|
|
||||||
lint = "./bin/lint.sh"
|
|
||||||
test = "./bin/test.sh"
|
|
||||||
# all = {composite = ["lint mypackage/", "test -v tests/"]}
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
testpaths = [ "tests" ]
|
testpaths = [ "tests" ]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user