Let's just say that I need to render a certain amount of HTML over and over in a page, for example, for a user's profile information. Jinja's macros seem like they're absolutely fit for such usage. However, Django doesn't have macros.
Right now, I'm using a custom filter for the same purpose - is this the best way to go about it, or am I missing something?
Thanks.
ps. I'm migrating an app that ran on GAE with webapp2 & Jinja to Django.
After some more mucking with the documentation, I finally found the "correct" way to do this: custom inclusion tags, which let you create a tag out of a template.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With