Opened 8 years ago
Closed 8 years ago
#28501 closed Bug (fixed)
"python -m django runserver" crashes
| Reported by: | Kit Darko | Owned by: | Yusuke Miyazaki |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 1.11 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In the interests of keeping code modular, we do not use manage.py runserver in our projects. Instead, we use django-admin runserver.
This works well, but if one wants to run python with some flags, using the django module, it is insufficient.
It would be ideal if python -m django runserver worked, for this reason. Currently, attempting to do so will yield an import error with similar to the attached traceback.
Attachments (1)
Change History (8)
by , 8 years ago
| Attachment: | traceback.txt added |
|---|
comment:1 by , 8 years ago
| Component: | Uncategorized → Core (Management commands) |
|---|---|
| Summary: | django runserver crashes when run as a module → "python -m django runserver" crashes |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Bug |
It looks like something to do with the autoreloader.
comment:2 by , 8 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 8 years ago
| Has patch: | set |
|---|
I could reproduce this error, found the problem in the autoreloader, and wrote a patch. PR.
comment:4 by , 8 years ago
| Needs tests: | set |
|---|
Is it feasible to add a test? See tests/utils_tests/test_autoreload.py for some existing tests.
comment:6 by , 8 years ago
| Needs tests: | unset |
|---|
Traceback for import error