Skip to content

Commit 19b64ce

Browse files
committed
Added DEBUG-Toolbar
1 parent 8400b76 commit 19b64ce

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

core/settings.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '.onrender.com']
3737
CSRF_TRUSTED_ORIGINS = ['http://localhost:8000', 'http://localhost:5085', 'http://127.0.0.1:8000', 'http://127.0.0.1:5085', 'https://rocket-django.onrender.com']
3838

39+
# Used by DEBUG-Toolbar
40+
INTERNAL_IPS = [
41+
"127.0.0.1",
42+
]
43+
3944
# Application definition
4045

4146
INSTALLED_APPS = [
@@ -60,6 +65,7 @@
6065
'rest_framework',
6166
'rest_framework.authtoken',
6267

68+
"debug_toolbar",
6369
]
6470

6571
MIDDLEWARE = [
@@ -71,16 +77,17 @@
7177
"django.contrib.auth.middleware.AuthenticationMiddleware",
7278
"django.contrib.messages.middleware.MessageMiddleware",
7379
"django.middleware.clickjacking.XFrameOptionsMiddleware",
80+
"debug_toolbar.middleware.DebugToolbarMiddleware",
7481
]
7582

7683
ROOT_URLCONF = "core.urls"
7784

78-
HOME_TEMPLATES = os.path.join(BASE_DIR, 'templates')
85+
UI_TEMPLATES = os.path.join(BASE_DIR, 'templates')
7986

8087
TEMPLATES = [
8188
{
8289
"BACKEND": "django.template.backends.django.DjangoTemplates",
83-
"DIRS": [HOME_TEMPLATES],
90+
"DIRS": [UI_TEMPLATES],
8491
"APP_DIRS": True,
8592
"OPTIONS": {
8693
"context_processors": [
@@ -198,7 +205,6 @@
198205
# risky
199206
SESSION_COOKIE_HTTPONLY=False
200207

201-
202208
MESSAGE_TAGS = {
203209
messages.INFO: 'text-blue-800 border border-blue-300 bg-blue-50 dark:text-blue-400 dark:border-blue-800',
204210
messages.SUCCESS: 'text-green-800 border border-green-300 bg-green-50 dark:text-green-400 dark:border-green-800',

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ python-dotenv==1.0.0
55
# Deployment
66
whitenoise==6.5.0
77
gunicorn==21.2.0
8+
django-debug-toolbar==4.2.0
89

910
# DB Layer
1011
# psycopg2-binary==3.1.12

0 commit comments

Comments
 (0)