Dec-09-2019, 01:25 AM
Dec-09-2019, 02:07 AM
Every web site is ultimately HTML, the following link explains it well: https://docs.djangoproject.com/en/2.2/topics/templates/
Dec-09-2019, 02:28 AM
If would be cool in browser could read
Template allow us to transfer Python-like code into html.
So eg on server.
.py
,but that's not the case browsers read html.Template allow us to transfer Python-like code into html.
So eg on server.
my_list = [1,2,3]Template.
<ul> {% for post in my_list %} <li>{{ post }}</li> {% endfor %} </ul>What the browser read and render from this template is real html,as that's what the browser understand.
<ul> <li>1</li> <li>2</li> <li>3</li> </ul>