django template

  • Create a template directory templates and html files
# 
# Template directory: Create a project root directory, and tools in the same layer manage.py 
# are created each application template directory under the template directory
# finally create a template html file in the corresponding application

 

  • Configuration template path
# In the project's global configuration file, set the template html file

 

 

  • View template function call
# Html template files are written, but also a good distribution, but also why? Of course, to the view function calls.

 

Guess you like

Origin www.cnblogs.com/igoodful/p/11480468.html