On Fri, 29 Jan 2021, at 19:18, Aztec Rabbit wrote:
> Curtis - This is nested block right? what i want is like tag include (can be 
> called more than once) but with children.

Correct. And that's more or less what nested block does;

The difference from include is sniplates takes a template and rips the blocks 
from it, each of which then becomes a macro of sorts.

> 
> Jure - I've read the documentation, can you give me a sample code? I am 
> confused
> 
> Hmmm, but i think this feature is very useful (for card, container, wrapper, 
> and anythink with different content) and each component can be included in 
> other components, thats awesome. I think this feature should be in django 
> core, but, yes, I understand.

I agree that it could be quite useful.

I would suggest first making a sample implementation. This would involve taking 
`do_include` from django/templates/loader_tags.py and making a version that's 
an enclosing block tag (like block)... then exposing the nodelist in the 
context.

--
Curtis

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a33eb617-6171-4a7d-826a-7ff6a9c1e077%40www.fastmail.com.

Reply via email to