2017-03-07 23:10:32 +08:00
|
|
|
#!/usr/bin/env python
|
2019-01-01 08:37:23 +08:00
|
|
|
"""Django's command-line utility for administrative tasks."""
|
2012-03-22 06:29:32 +08:00
|
|
|
import os
|
|
|
|
import sys
|
2011-02-13 09:56:12 +08:00
|
|
|
|
2018-12-07 03:45:40 +08:00
|
|
|
|
|
|
|
def main():
|
2019-12-09 14:54:51 +08:00
|
|
|
"""Run administrative tasks."""
|
2018-02-21 07:52:28 +08:00
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ project_name }}.settings')
|
2016-03-20 07:49:06 +08:00
|
|
|
try:
|
|
|
|
from django.core.management import execute_from_command_line
|
2017-01-22 09:02:00 +08:00
|
|
|
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
|
2011-10-13 13:56:15 +08:00
|
|
|
execute_from_command_line(sys.argv)
|
2018-12-07 03:45:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|