Hi Nexx
Simply put, and as explained by Motaz, *block *is a django special purpose
function called *template tag *which help to organize hierarchically your
templates.
Short better than long, see the following documentation:
https://docs.djangoproject.com/en/2.2/ref/templates/builtins/#block
'
If you have multiple pages in a website , say , home page , about page and
contact page , now all common content that is not changing from page to
like navbar , header and footer you place them in a template page you can
call it layout.html , and in this template page layout .html you define a
re
If you see at the beginning of your template it loads/import another file which
actually contains the part of code which goes in there, this block has same
name like myBlock.
Hope this is helpful
Happy coding!
Sent from my iPhone
> On Feb 25, 2019, at 4:06 PM, Nexx wrote:
>
> Wht is the pu
Wht is the purpose of the tag
{% block myBlock %}
I red the document but i don't underatand.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubs
4 matches
Mail list logo