一,静态文件
-
css,js,图片,json文件,字体文件等
1.1 新建以下目录:\Django\MyDjango\project\static\MyApp\css \Django\MyDjango\project\static\MyApp\font \Django\MyDjango\project\static\MyApp\image \Django\MyDjango\project\static\MyApp\js \Django\MyDjango\project\static\MyApp\json \Django\MyDjango\project\static\MyApp\other
1.2 settings.py 文件中设置静态文件路径
STATICFILES_DIRS = [ os.path.join(BASE_DIR,"static") ]
1.3 添加css文件 \Django\MyDjango\project\static\MyApp\