diff options
| author | William Schwartz <wkschwartz@gmail.com> | 2021-01-04 08:50:49 -0600 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-05 21:03:29 +0100 |
| commit | ec6d2531c59466924b645f314ac33f54470d7ac3 (patch) | |
| tree | 5da987d1502badb8e50650315ab7f0cff58a5281 /tests/utils_tests/test_module/__main__.py | |
| parent | 415f50298f97fb17f841a9df38d995ccf347dfcc (diff) | |
Fixed #32314 -- Fixed detection when started non-django modules with "python -m" in autoreloader.
django.utils.autoreload.get_child_arguments() detected when Python was
started with the `-m` option only for `django` module. This commit
changes the logic to check __spec__, see
https://docs.python.org/3/reference/import.html#main-spec
Now packages can implement their own __main__ with the runserver
command.
Diffstat (limited to 'tests/utils_tests/test_module/__main__.py')
| -rw-r--r-- | tests/utils_tests/test_module/__main__.py | 0 |
1 files changed, 0 insertions, 0 deletions
diff --git a/tests/utils_tests/test_module/__main__.py b/tests/utils_tests/test_module/__main__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/utils_tests/test_module/__main__.py |
