2017-03-07 23:10:32 +08:00
|
|
|
#!/usr/bin/env python
|
2019-11-02 12:08:23 +08:00
|
|
|
# When the django-admin.py deprecation ends, remove this script.
|
|
|
|
import warnings
|
|
|
|
|
2005-07-20 23:00:34 +08:00
|
|
|
from django.core import management
|
2005-07-21 01:42:36 +08:00
|
|
|
|
2019-11-02 12:08:23 +08:00
|
|
|
try:
|
|
|
|
from django.utils.deprecation import RemovedInDjango40Warning
|
|
|
|
except ImportError:
|
|
|
|
raise ImportError(
|
|
|
|
'django-admin.py was deprecated in Django 3.1 and removed in Django '
|
|
|
|
'4.0. Please manually remove this script from your virtual environment '
|
|
|
|
'and use django-admin instead.'
|
|
|
|
)
|
|
|
|
|
2005-07-21 01:42:36 +08:00
|
|
|
if __name__ == "__main__":
|
2019-11-02 12:08:23 +08:00
|
|
|
warnings.warn(
|
|
|
|
'django-admin.py is deprecated in favor of django-admin.',
|
|
|
|
RemovedInDjango40Warning,
|
|
|
|
)
|
2005-12-06 13:17:52 +08:00
|
|
|
management.execute_from_command_line()
|