In web. py, call the template method in the folder, web. py Template
The web. py template is very easy to use, but sometimes we need to perform directory level for management. How to use a directory-level template?
We usually declare the template folder before using the template.
Copy codeThe Code is as follows:
Render = web. template. render ('templates ')
Use the templatesfolder index.html Template
Copy codeThe Code is as follows:
Return render. index ()
Use the templatesfolder list.html Template
Copy codeThe Code is as follows:
Return render. list ()
All the preceding html template files are only stored in the tempates directory. To create a directory under the templates directory and use the template file under the directory, you only need to add the directory name.
Use the index.html template in the admindirectory under templates
Copy codeThe Code is as follows:
Return render. admin. index ()
Use the login.html template in the admindirectory under templates
Copy codeThe Code is as follows:
Return render. admin. login ()
Ppt is the design template in the Web folder of all slide applications.
If you use version 2003 for the question, you can perform the following operations:
Click "format" ---- "slide design" (a pane is displayed on the right of the window)
Click "design template" (this is in the displayed pane. You can find it)
Click "Browse" (you can see it at the bottom of the pane)
Then select the location of the template required in the question on the computer.
The operation is complete.
Where is the template folder in the website template file? How can I use the template?
We recommend that you search "Templates" or "Template" in the search bar of your computer. Most software uses the name "Templates" to create a Template folder. The number of "Templates" folders listed in different programs is different. There should be many "Templates" in your search box. Then, open "Templates" and find the Templates you need. If the discuz Template you mentioned does have a "Template", you can find it.