Skip to content

Commit

Permalink
remove django silk (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-rizzo authored Feb 13, 2024
1 parent eeeda23 commit dd77007
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions backend/apps/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
), # type: ignore
]

# Profiling URLs
urlpatterns += [path(settings.SILKY_URL, include("silk.urls", namespace="silk"))]

# Local URLs
is_local = (
settings.DEBUG and os.environ["DJANGO_SETTINGS_MODULE"] == "config.settings.local"
Expand Down
1 change: 0 additions & 1 deletion backend/config/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ django-environ==0.11.2 # https://github.com/joke2k/django-environ
django-fsm==2.8.1 # https://github.com/viewflow/django-fsm
django-fsm-log==3.1.0 # https://github.com/jazzband/django-fsm-log
django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils
django-silk==5.1.0 # https://github.com/jazzband/django-silk
django-storages[boto3]==1.14.2 # https://github.com/jschneier/django-storages
django-money==3.3.0 # https://github.com/django-money/django-money
whitenoise==6.6.0 # https://github.com/evansd/whitenoise/
12 changes: 0 additions & 12 deletions backend/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
"django_quill",
"djmoney",
"storages",
"silk",
]

LOCAL_APPS = [
Expand Down Expand Up @@ -149,7 +148,6 @@
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"silk.middleware.SilkyMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
Expand Down Expand Up @@ -296,16 +294,6 @@
ACCOUNT_AUTHENTICATION_METHOD = 'email'

# Your stuff...
# ------------------------------------------------------------------------------

# Django Silk - https://github.com/jazzband/django-silk
# ------------------------------------------------------------------------------
SILKY_PYTHON_PROFILER = True
SILKY_URL = env("SILKY_URL")
SILKY_MAX_REQUEST_BODY_SIZE = -1 # Silk takes anything <0 as no limit
SILKY_MAX_RESPONSE_BODY_SIZE = 1024 # If response body>1024 bytes, ignore
SILKY_INTERCEPT_PERCENT = 1 # log only 1% of requests

# INTERNAL
# ------------------------------------------------------------------------------
STAFF_URL = env("STAFF_URL")
Expand Down
7 changes: 0 additions & 7 deletions backend/config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@
},
}


# Django Silk - https://github.com/jazzband/django-silk
# ------------------------------------------------------------------------------
SILKY_AUTHENTICATION = True # User must login
SILKY_AUTHORISATION = True # User must have permissions
SILKY_PERMISSIONS = lambda user: user.is_superuser # noqa

# Rollbar
# ------------------------------------------------------------------------------
MIDDLEWARE += ["rollbar.contrib.django.middleware.RollbarNotifierMiddleware"]
Expand Down

0 comments on commit dd77007

Please sign in to comment.