1.图片就放在statics文件夹下,settings.py 要追加
STATIC_URL = ‘/statics/’
STATICFILES_DIRS= (
os.path.join(BASE_DIR, “statics”),
)
2.urls.py
from django.views.static import serve
urlpatterns = [
url(r’^index/’,views.index),
url(r’^statics/(?P
]
3.再建js,css文件的话,不用再建文件夹时,就不用改动了。