Opened 8 years ago
Closed 8 years ago
#27522 closed Bug (fixed)
./manage runserver --nostatic doesn't return a traceback
Reported by: | Jeroen van Veen | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | runserver nostatic |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
When running ./manage runserver --nostatic, I expect a traceback to be returned when
a syntax error occurs, and I expect the autoreloader still to be available. Instead, the
runserver command exits like:
usage: manage.py runserver [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--ipv6] [--nothreading] [--noreload] [addrport] manage.py runserver: error: unrecognized arguments: --nostatic
Ticket: https://github.com/wearespindle/django/tree/ticket_27522
Change History (13)
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
comment:4 by , 8 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 8 years ago
Version: | 1.10 → 1.8 |
---|
comment:6 by , 8 years ago
Keywords: | runserver nostatic added |
---|
comment:7 by , 8 years ago
Description: | modified (diff) |
---|---|
Version: | 1.8 → master |
comment:8 by , 8 years ago
I can reproduce the problem. Without taking a closer look, I'm not sure about the solution. If you could write a test, that would certainly help.
comment:9 by , 8 years ago
Description: | modified (diff) |
---|---|
Has patch: | set |
Needs tests: | set |
PR (currently without tests)
comment:10 by , 8 years ago
Description: | modified (diff) |
---|---|
Needs tests: | unset |
I'm trying to figure out where this test should be placed.
comment:11 by , 8 years ago
Needs tests: | set |
---|
Some tests for runserver
are in admin_scripts/tests.py
. It might be infeasible to test this (for example, fe6ddb837d18bd4e71cd22fc18272d31478b19f2 lacked tests) but it would be nice to try.
comment:13 by , 8 years ago
Needs tests: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Steps to reproduce: modify a Django project to have a syntax error and run runserver --nostatic
. You should see the SyntaxError
traceback (after this fix) rather than manage.py runserver: error: unrecognized arguments: --nostatic
.
I don't think it's feasible to write a test for this so I'll commit the change without one.
This is a workaround: