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.
--
Ticket URL: <https://code.djangoproject.com/ticket/28501>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "traceback.txt" added.
Traceback for import error
* component: Uncategorized => Core (Management commands)
* type: Uncategorized => Bug
* stage: Unreviewed => Accepted
Comment:
It looks like something to do with the autoreloader.
--
Ticket URL: <https://code.djangoproject.com/ticket/28501#comment:1>
* owner: nobody => Yusuke Miyazaki
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28501#comment:2>
* has_patch: 0 => 1
Comment:
I could reproduce this error, found the problem in the autoreloader, and
wrote a patch. [https://github.com/django/django/pull/9032 PR].
--
Ticket URL: <https://code.djangoproject.com/ticket/28501#comment:3>
* needs_tests: 0 => 1
Comment:
Is it feasible to add a test? See `tests/utils_tests/test_autoreload.py`
for some existing tests.
--
Ticket URL: <https://code.djangoproject.com/ticket/28501#comment:4>
Comment (by Yusuke Miyazaki):
I add some tests. Could you review this PR again?
--
Ticket URL: <https://code.djangoproject.com/ticket/28501#comment:5>
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/28501#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"278d66b94bb443e1c1581e014fee2593a33f338c" 278d66b9]:
{{{
#!CommitTicketReference repository=""
revision="278d66b94bb443e1c1581e014fee2593a33f338c"
Fixed #28501 -- Fixed "python -m django runserver" crash.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28501#comment:7>