manage.py
python_backend/curriculum/django/manage.py
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")
try:
from django.core.management import execute_from_command_line
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)
if __name__ == "__main__":
main()
相关文章
apps.py
apps.py — python source code from the python backend learning materials (python_backend/curriculum/django/blog/apps.py).
阅读文章 →0001_initial.py
0001_initial.py — python source code from the python backend learning materials (python_backend/curriculum/django/blog/migrations/0001_initial.py).
阅读文章 →models.py
models.py — python source code from the python backend learning materials (python_backend/curriculum/django/blog/models.py).
阅读文章 →urls.py
urls.py — python source code from the python backend learning materials (python_backend/curriculum/django/blog/urls.py).
阅读文章 →views.py
views.py — python source code from the python backend learning materials (python_backend/curriculum/django/blog/views.py).
阅读文章 →asgi.py
asgi.py — python source code from the python backend learning materials (python_backend/curriculum/django/myproject/asgi.py).
阅读文章 →