Django template is unavoidable to use some JS and CSS files, check a lot of pages, was made slightly dizzy, or the official website, to a link you can see their own English.
https://docs.djangoproject.com/en/1.6/howto/static-files/
The general steps are this:
1. Make sure that the Installed_apps in the setting.py include Django.contrib.staticfiles, and no one can add it.
2. Also add in setting.py, we need to add static resource related configuration. It can be written like this:
Static_url='/static'
Staticfiles_dirs= (
Os.path.join (Base_dir, ' ... /.. /static '). replace (' \ \ ', '/'),
)
3. This is not enough, put your static directory in your app directory, so Django will automatically find the static directory under each application.
4. This is okay in the template.
Add {% load staticfiles%} to the template
When used as shown:
This way, you can make your template style more beautiful.
The Django template references static resources (JS,CSS, etc.)