',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'...django.contrib.messages',
'django.contrib.staticfiles',
]
项目路径
BASE_DIR:主要通过os模块读取当前项目在计算机系统的具体路径...代码如下:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes...',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',...我们为媒体文件夹media添加相应的路由地址
from django.conf import settings
from django.urls import path, re_path
from django.views.static