diff options
| author | jpic <jpic@users.noreply.github.com> | 2018-12-06 20:45:40 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-12-06 14:45:40 -0500 |
| commit | 9453bc77f4968dc3a8167eadbf97759538133332 (patch) | |
| tree | bbb537928aa6c7114fbc54dd8a7d5a043ddfc07a | |
| parent | 4c7c608a1deee37055d4a2b8a71e34def04a2a1f (diff) | |
Fixed #30003 -- Added usable entry point in default manage.py.
| -rwxr-xr-x | django/conf/project_template/manage.py-tpl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/django/conf/project_template/manage.py-tpl b/django/conf/project_template/manage.py-tpl index 48c9190f03..147e335e35 100755 --- a/django/conf/project_template/manage.py-tpl +++ b/django/conf/project_template/manage.py-tpl @@ -2,7 +2,8 @@ import os import sys -if __name__ == '__main__': + +def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings') try: from django.core.management import execute_from_command_line @@ -13,3 +14,7 @@ if __name__ == '__main__': "forget to activate a virtual environment?" ) from exc execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() |
