Kaydet (Commit) 9453bc77 authored tarafından jpic's avatar jpic Kaydeden (comit) Tim Graham

Fixed #30003 -- Added usable entry point in default manage.py.

üst 4c7c608a
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
import os import os
import sys import sys
if __name__ == '__main__':
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings')
try: try:
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line
...@@ -13,3 +14,7 @@ if __name__ == '__main__': ...@@ -13,3 +14,7 @@ if __name__ == '__main__':
"forget to activate a virtual environment?" "forget to activate a virtual environment?"
) from exc ) from exc
execute_from_command_line(sys.argv) execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment