Google News
logo
Django - Interview Questions
What are templates in Django or Django template language?
Templates are an integral part of the Django MVT architecture. They generally comprise HTML, CSS, and js in which dynamic variables and information are embedded with the help of views. Some constructs are recognized and interpreted by the template engine. The main ones are variables and tags.
 
A template is rendered with a context. Rendering just replaces variables with their values, present in the context, and processes tags. Everything else remains as it is.
 
The syntax of the Django template language includes the following four constructs :
 
* Variables
* Tags
* Filters
* Comments

To read more about templates you can refer to this : https://docs.djangoproject.com/en/4.0/topics/templates/
Advertisement