The comeback
This commit is contained in:
19
manage.py
Normal file → Executable file
19
manage.py
Normal file → Executable file
@ -4,19 +4,20 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
msg = (
|
||||
"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 ImportError(msg) from exc
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Run administrative tasks."""
|
||||
os.environ.setdefault(key="DJANGO_SETTINGS_MODULE", value="core.settings")
|
||||
try:
|
||||
from django.core.management import execute_from_command_line # noqa: PLC0415
|
||||
except ImportError as exc:
|
||||
msg = (
|
||||
"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 ImportError(msg) from exc # noqa: DOC501, RUF100
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user