2024-07-08
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
In the previous few days, we introduced the basic concepts of Django, models and views. Today we will explore Django's template system, which is responsible for combining data and HTML templates to generate content that end users see.
Django's template system is a powerful tool for inserting dynamic data into static or semi-static pages. It uses its own template language that allows you to embed Python code in HTML.
templates
Django will automatically look for template files in this folder.myapp/├── templates/ │ └── base.html └── ...
templates
folder, create an HTML file and write your template.DOCTYPE html