Interested to learn more about this project #46
Replies: 1 comment 1 reply
-
Hey! Thanks for the interest, django-components looks like a really cool project too!
Yes, the scope here is to build a fully functional template backend for Django, which can render any existing Django template correctly.
I'm leaning towards "no" right now - instead I'm hoping to just handle tags and filtered registered using Django's
If Django's loaders returned strings, I think we could have re-used them here. But since they return
I'm currently only planning on releasing as a Python package on PyPI. However, I'm open to discussing whether it makes sense to share some internals as a crate. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I just found out about this project. I'm working on django-components. There, we've extended Django templates with stuff like allowing literal lists and dicts as template tag inputs, and more.
I initially implemented those extensions in Python, but I've moved them to Rust because it was horribly slow. The Rust port is not published yet (I got side tracked with writing benchmarking tests for django-components). I implemented the AST parser using Pest, which offers a BNF-like syntax.
Because of additions like the support of literal lists and dicts, some internals will have to be slightly different - e.g. django-components has to override
FilterExpression
(and maybe alsoVariable
) class, in order to construct them from the AST.That's why we're thinking of eventually making django-components into a standalone templating engine for Django. And if/when we get there, it would also make sense to eventually move some parts to Rust for better performance.
So, I'm finally getting to my point - I'd like to learn more about this project 😄
Library
class (since, AFAIK, that's specific to the django templating engine)?Beta Was this translation helpful? Give feedback.
All reactions