JinjaX addition might be good, as you are already using jinja2 #15
Closed
AhnafCodes
started this conversation in
Ideas
Replies: 1 comment
-
Whoops, didn't get a notification for this. I'll take a look! I do have something similar though. I'm not totally happy with the current implementation and am going to make some changes soon, but it enables a similar syntax (this example has components namespaced under "admin", but generally they would just be HTML elements that start with an uppercase letter and load a template from It is completely undocumented at the moment, unfortunately: https://github.com/dropseed/plain/tree/master/plain-elements |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Django after 2017-18 was being used only as backend with DRF. Frontend space was primarily captured by ReactJs.
One thing I thing React got right was React’s preference of Composition over inheritance.
Unlike, Django Templating(DTL) were inheritance is mostly used to structure a page. We often have a "base.html"(parent) with defined blocks and this is extended with blocks being overridden/reused in the child. It might be confusing at times when only selective blocks/parts of the parent template are used.
There is composition using "include", but its often not the first choice and it all feels cluttered & verbose.
JinjaX(Jinja extension) gives us ability similar to React to define granular components and compose Pages/Views using those smaller components.
Beta Was this translation helpful? Give feedback.
All reactions