django-avatar/test_proj/manage.py

27 lines
800 B
Python
Raw Normal View History

2016-09-03 15:47:01 +00:00
#!/usr/bin/env python
2022-08-09 19:17:24 +00:00
"""Django's command-line utility for administrative tasks."""
2016-09-03 15:47:01 +00:00
import os
import sys
2022-08-09 19:17:24 +00:00
def main():
"""Run administrative tasks."""
2016-09-03 15:47:01 +00:00
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_proj.settings")
# Add the django-avatar directory to the Python path. That way the
# avatar module can be imported.
2022-07-16 20:50:05 +00:00
sys.path.append("..")
2016-09-03 15:47:01 +00:00
try:
from django.core.management import execute_from_command_line
2022-08-09 19:17:24 +00: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
2016-09-03 15:47:01 +00:00
execute_from_command_line(sys.argv)
2022-08-09 19:17:24 +00:00
if __name__ == "__main__":
main()