Skip to content
Permalink
Browse files

Update manage.py to the latest from django

  • Loading branch information...
overshard committed Jul 6, 2018
1 parent 144df57 commit e3e201281d04270f70614f85d1a1368891c82410
Showing with 10 additions and 18 deletions.
  1. +10 −18 manage.py
@@ -1,26 +1,18 @@
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
sys.dont_write_bytecode = True

if __name__ == '__main__':
os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
"timestrap.settings.development"
'DJANGO_SETTINGS_MODULE',
'timestrap.settings.development'
)
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django # noqa: F401
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
raise
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)

0 comments on commit e3e2012

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.