Re: Feature request: Template tag like stateless component in JSX React

2021-01-29 Thread Curtis Maloney
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 rip

Re: Feature request: Template tag like stateless component in JSX React

2021-01-29 Thread Jure Erznožnik
Aztec, Just look in the dynamicforms/templates folder: all templates for input fields are built using this tag in its various forms. There's plenty of examples there. And yes, it's exactly what you asked for. LP, Jure On 29. 01. 21 09:18, Aztec Rabbit wrote: Curtis - This is nested block rig

Re: Feature request: Template tag like stateless component in JSX React

2021-01-29 Thread Aztec Rabbit
Curtis - This is nested block right? what i want is like tag include (can be called more than once) but with children. 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

Re: Feature request: Template tag like stateless component in JSX React

2021-01-28 Thread Jure Erznožnik
Source is here (https://github.com/velis74/DynamicForms/blob/master/dynamicforms/templatetags/dynamicforms.py - see at end of file), documentation will follow shortly as we near 1.0 release (right now it's pretty pathetic, but it is there at readthedocs), but there are examples & unit tests includ

Re: Feature request: Template tag like stateless component in JSX React

2021-01-28 Thread Curtis Maloney
I did something like this in django-sniplates https://sniplates.readthedocs.io/en/latest/tags.html#the-nested-widget-tag -- C On Thu, 28 Jan 2021, at 17:33, Aztec Rabbit wrote: > Hi, > > I think template tag like in JSX is very useful, for example: > > > card.html > > > {{ title }} > {{

Re: Feature request: Template tag like stateless component in JSX React

2021-01-28 Thread Aztec Rabbit
Is there a link to the documentation or source code to the library you created? And can i know why it is not accepted? On Thursday, January 28, 2021 at 9:34:03 PM UTC+7 jure.er...@gmail.com wrote: > We have just created a tag like that in our dynamicforms library. It's > called "extendtemplate

Re: Feature request: Template tag like stateless component in JSX React

2021-01-28 Thread Jure Erznožnik
We have just created a tag like that in our dynamicforms library. It's called "extendtemplateblock". Feel free to use or copy, but it doesn't look like it's going to be accepted in Django itself. We tried to keep API similar to the "include" tag, so it should be easy to use. You can choose t

Feature request: Template tag like stateless component in JSX React

2021-01-28 Thread Aztec Rabbit
Hi, I think template tag like in JSX is very useful, for example: > card.html {{ title }} {{ component.children }} > index.html {% component './card.html' with title='Foo' %} Bar {% endcomponent %} -- You received this message because you are subscribed to the Google Groups "Django