Skip to content

Commit d7bb3a3

Browse files
committed
Fix "make example" command to run the dev server
Previously failed with: ModuleNotFoundError: No module named 'example'
1 parent ac52b23 commit d7bb3a3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ isort_check_only:
1010
isort -rc -c debug_toolbar example tests
1111

1212
example:
13-
DJANGO_SETTINGS_MODULE=example.settings \
14-
python -m django runserver
13+
python example/manage.py runserver
1514

1615
jshint: node_modules/jshint/bin/jshint
1716
./node_modules/jshint/bin/jshint debug_toolbar/static/debug_toolbar/js/*.js

example/manage.py

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import os
33
import sys
44

5+
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
6+
57
if __name__ == "__main__":
68
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")
79

0 commit comments

Comments
 (0)