Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit fabeca1

Browse files
committed
Installed django-debug-toolbar
1 parent 3d51d1c commit fabeca1

File tree

8 files changed

+33
-3
lines changed

8 files changed

+33
-3
lines changed

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name = "pypi"
55

66
[packages]
77
django = "*"
8+
django-debug-toolbar = "*"
89

910
[dev-packages]
1011

Pipfile.lock

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,15 @@ It should look like this at [localhost:8000](localhost:8000)
3232
```
3333
python manage.py startapp playground
3434
```
35-
It will add `playground` in the directory.
35+
It will add `playground` in the directory.
36+
37+
38+
### 5. django-debug-toolbar
39+
40+
[Reference](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html)
41+
42+
On `no such table: django_session` error run :
43+
```
44+
python manage.py makemigrations
45+
python manage.py migrate
46+
```

db.sqlite3

128 KB
Binary file not shown.
99 Bytes
Binary file not shown.
53 Bytes
Binary file not shown.

djangoProject/settings.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
'django.contrib.sessions', # not used
3838
'django.contrib.messages',
3939
'django.contrib.staticfiles',
40-
'playground'
40+
'playground',
41+
'debug_toolbar'
4142
]
4243

4344
MIDDLEWARE = [
@@ -48,6 +49,13 @@
4849
'django.contrib.auth.middleware.AuthenticationMiddleware',
4950
'django.contrib.messages.middleware.MessageMiddleware',
5051
'django.middleware.clickjacking.XFrameOptionsMiddleware',
52+
"debug_toolbar.middleware.DebugToolbarMiddleware",
53+
]
54+
55+
INTERNAL_IPS = [
56+
# ...
57+
"127.0.0.1",
58+
# ...
5159
]
5260

5361
ROOT_URLCONF = 'djangoProject.urls'

djangoProject/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616

1717
from django.contrib import admin
1818
from django.urls import path, include
19+
import debug_toolbar
1920

2021
urlpatterns = [
2122
path('admin/', admin.site.urls),
2223
path('playground/', include('playground.urls')),
24+
path('__debug__/', include(debug_toolbar.urls)),
2325
]

0 commit comments

Comments
 (0)