Template loader behavior change #33

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

jpfarias commented May 31, 2012

This is a change on the behavior of the template loader to enable it to load templates relatively to the package of the caller module, this way it will match the current behavior of the pyramid's chameleon template loader.

I have also added a test case for it.

Owner

tseaver commented May 31, 2012

Thanks for the patch -- it looks great overall.

Could you please update 'docs/index.rst' to add a description of the new
lookup behavior?

Contributor

jpfarias commented May 31, 2012

I just changed docs/index.rst to reflect the new lookup behavior.

Member

domenkozar commented Sep 11, 2012

Could you also add a changelog entry and add your name to CONTRIBUTORS.txt?

Contributor

jpfarias commented Sep 11, 2012

Sure!

Member

domenkozar commented Sep 11, 2012

Merged. Thanks 🍻

@domenkozar domenkozar closed this Sep 11, 2012

@domenkozar domenkozar reopened this Sep 13, 2012

Member

domenkozar commented Sep 13, 2012

While this works for templates rendered through Pyramid API, those rendered as part of inheritance or similar will not render relative.

To cover all templates, we need to solve this here: https://github.com/Pylons/pyramid_jinja2/blob/master/pyramid_jinja2/__init__.py#L176

The question is, how to retrieve package there :)

Contributor

jpfarias commented Sep 13, 2012

Is it in the environment? How does the included Chameleon template loader deals with that?

Member

domenkozar commented Sep 13, 2012

Needs some research, but to me it looks handling of template lookups needs to be rethought from scratch and most imporantly - edge case tested. Needs a hero or my spare time someday.

@domenkozar domenkozar closed this Nov 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment