filmov
tv
Django Templates - DRY Templates, Partials, and Passing Context to Child Templates
![preview_player](https://i.ytimg.com/vi/DJwytraqwoE/maxresdefault.jpg)
Показать описание
In this video, we'll learn some best practices for Django templates, including:
1. How to keep templates DRY by extracting common code to partials (or fragments)
2. How to include child HTML templates with the {% include %} template-tag.
3. How to pass dynamic/additional CONTEXT down to partial templates to customize them
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
02:50 Extracting Common HTML to Partial Templates
04:22 Passing Context to Partial Templates
07:42 Passing 'Active' Context to Partial
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
▶️ Full Playlist:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
#django #python
1. How to keep templates DRY by extracting common code to partials (or fragments)
2. How to include child HTML templates with the {% include %} template-tag.
3. How to pass dynamic/additional CONTEXT down to partial templates to customize them
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
02:50 Extracting Common HTML to Partial Templates
04:22 Passing Context to Partial Templates
07:42 Passing 'Active' Context to Partial
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
▶️ Full Playlist:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
#django #python
Django Templates - DRY Templates, Partials, and Passing Context to Child Templates
How to DRY Templates Properly in Django. Use extends, block and include.
django-slippers and DRY Django Templates
Django, Templates inheriting and Following the DRY principle
Django Base Template | Django Project | djblogger | 23
Extending and including Templates. Python Django Web Framework Course. #8
How to reuse HTML template in Django
Django & HTMX - django-template-partials for Template Partial Responses
Django : How do I DRY up common text in a Django template?
Adhering to DRY principle with Django templates by Indika Rajapaksha at PyCon Sri Lanka 2023
Django : Using template language in Django in a DRY way
Explore Django - Django Templates
Django - Using Startproject and Startapp Templates
PYTHON : django templates: include and extends
Building a Tab System with Alpine.js and TailwindCSS / DRY Django Templates
Tags of Django | How to use Extends and Include Django Template Tags | Django Tutorials
Render Data to Django Template | Django Project | djblogger | 28
Inheritance in Django Templates
PYTHON : Django templates: overriding blocks of included children templates through an extended temp
Django 2 - templates (Html5) with shazziedvl
Django 2 for Beginners #19 Including Template Partials
building a Web App with Python (Django) : 3 - Templates
How To Modify and Override Django Allauth Template Page
Getting Started with ExpressionEngine - Lesson 6: DRY Template Layouts and Partials
Комментарии