On Nov 1, 2016, at 10:26 AM, Prateek <
pratee...@gmail.com> wrote:
> I am reading Django Unleashed in which the author uses the following code to extends the template
>
> {% extends parent_template|default:"organizer/base_organizer.html" %}
>
> What does parent_template do ?
Hi Prateek,
Thanks for buying my book!
The first time we use parent_template---a variable, not a template tag---is on page 108 of the book. The paragraph before Example 4.53 provides a full explanation of why I opt to use a variable with a default, rather than a magic (read: hardcoded) string.
Hope that's helpful!
Andrew