我已经签入了settings.py 文件和html 文件。但一切都很好,但它不起作用。请帮我解决这个问题。文件和css文件的路径一切正常。我还检查了代码,但一切都很好。检查告诉我该文件不存在。但它存在
按照步骤操作
# -------- handle Static Files In Django --------
# Steps:
# 1 - Create (static) folder in Root Directory of Project
# 2 - Paste Your Static Files Folder in (static) Folder (js,css,images...etc)
# 3 - Now Do Setting in (setting.py)
STATIC_URL = '/static/'
# STATICFILES_DIRS = [
# os.path.join(BASE_DIR,'static')
# ]
STATICFILES_DIRS = [BASE_DIR / 'static']
# 4 - add {% load static %} tag on top of html page
# 5 - Now use ({% static 'assets/image.jpg' %}) tag in HTML File for calling static files
# 6 - Done