Skip to content

Commit

Permalink
added django-silk as core dependency and not dev one
Browse files Browse the repository at this point in the history
  • Loading branch information
opaduchak committed Jan 13, 2025
1 parent 0dab0fc commit 1b44cfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,14 @@
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]

# run under ASGI locally:
INSTALLED_APPS.insert(0, "daphne") # django's reference asgi server
ASGI_APPLICATION = "app.asgi.application"

if DEBUG and not env.TESTING:
# add django-silk to enable profiling
INSTALLED_APPS.append("silk")
MIDDLEWARE.insert(0, "silk.middleware.SilkyMiddleware")
if DEBUG:
# run under ASGI locally:
INSTALLED_APPS.insert(0, "daphne") # django's reference asgi server
ASGI_APPLICATION = "app.asgi.application"


ROOT_URLCONF = "app.urls"
Expand Down Expand Up @@ -174,7 +173,6 @@
},
}

SILKY_PYTHON_PROFILER = True
DATABASE_ROUTERS = ["addon_service.osf_models.db_router.OsfDatabaseRouter"]

REST_FRAMEWORK = {
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pyjwe = "1.0.0"
cryptography = "42.0.7"
boto3 = "1.34"
boa-api = "^0.1.14"
django-silk = "^5.3.2"


[tool.poetry.group.dev.dependencies]
Expand All @@ -32,7 +33,6 @@ flake8 = "^7.1.1"
isort = "^5.13.2"
pre-commit = "^3.8.0"
pdoc = "14.5.1"
django-silk = "^5.3.2"

[tool.poetry.group.release.dependencies]
sentry-sdk = "2.7.1"
Expand Down

0 comments on commit 1b44cfe

Please sign in to comment.