Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Jinja should advertise itself over an entry-point #108

Closed
ralphbean opened this Issue · 3 comments

2 participants

@ralphbean

Both the TurboGears and ToscaWidgets frameworks look for templating engines by iterating over the python.templating.engines entry point group. Jinja2 could be used by both of those frameworks if this interface is added.

Mako, for instance, advertises itself through an ext plugin.

Here is where the advertisement is registered:
http://www.makotemplates.org/trac/browser/setup.py#L47

Here is the source for the entry point itself:
http://www.makotemplates.org/trac/browser/mako/ext/turbogears.py

This could be taken up in jinja2 by exploding jinja2/ext.py out into its own sub package without losing any backwards compatibility.

@ralphbean ralphbean referenced this issue from a commit in ralphbean/jinja2
@ralphbean ralphbean Added entry point advertisement. Relates to #108. 65e2708
@mitsuhiko
Owner

No, no, no, no. That interface is horribly broken. We ripped this out for good when we went to Jinja2 and I don't want to see this coming back. Jinja1 was one of the first template engines that supported that endpoint and it just caused a ton of problems. All modern webframeworks stopped supporting that.

@mitsuhiko mitsuhiko closed this
@ralphbean

Thanks for your input, Armin. We'll look into more modern ways to discover template engines.

@ralphbean

Just posting here for posterity, tw2 supports jinja2 (without the buffet interface) as of tw2-2.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.