django- configure static resources

django- configure static resources

1, in the root of the project, create a static folder

2, in settings.pythe arrangement position of static folders

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static"),
]

3, the static folder, create a new index.css (not required)

4, the template page, the introduction of static resource files

/static/css/index.css

Guess you like

Origin www.cnblogs.com/hylone/p/11854690.html