-
-
Notifications
You must be signed in to change notification settings - Fork 25
Description
I'm not sure if you're aware of a similar project, django-template-partials, which allows users to render partial templates by simply appending the partial name to the template name, e.g. template_name = 'my_template.html#my-partial-name' within a TemplateResponse class-based view. I don't know the specifics of their approach (yet?), but it seems to hook into Django's Template Loaders, and if a given template name contains a #, it splits it and renders the request partial (or block, in your case).
That library does not seem to support template inheritance the way yours does (e.g., with django-render-block I can render a block defined in a parent template, but with django-template-partials it's not possible to render a partial defined in a parent template).
I'd love to be able to use a similar shorthand with your library instead of having to import and call render_block_to_string in each of the response generating methods of a given ClassBaseView.