load tag #100

Closed
kaos opened this Issue Nov 30, 2013 · 3 comments

Projects

None yet

1 participant

@kaos
Member
kaos commented Nov 30, 2013

There's a load tag in Django, which we don't have.

I suggest that we implement the load tag thus that we can add modules to the filter_modules and custom_tags_modules options in the compilers dtl_context.

Also, in order to support loading only a named subset of the filters/tags from a module, it seems a small refactoring of those options would be in order. Namely, fill in a list for each of filters and tags available from the modules. (hope it makes sense, it's as much for myself so I don't forget it..)

@kaos kaos was assigned Nov 30, 2013
@kaos
Member
kaos commented Jan 10, 2014

The options need to be on a form of {name, module} tuples in order to offer a level of indirection towards the name to implementation module details. That way you can have a {% load l10n %} tag without worrying about which module is actually implementing that tag.

@kaos kaos referenced this issue Feb 22, 2014
Closed

extend filter api #135

@kaos
Member
kaos commented Feb 27, 2014

load tag syntax:

{% load some_library %}
{% load lib1 lib2 ... %}
may not apply, as we don't have packages in erlang: {% load package.lib ... %}
{% load foo bar from lib %}

A library is simply a Erlang module, implementing the erlydtl_library behaviour.

@kaos
Member
kaos commented Feb 27, 2014

A new option will also be introduced, libraries :: [{Library, Module}], that maps a library name in the template domain into a module name in the Erlang domain.

@kaos kaos modified the milestone: 0.9.1, 1.0 Feb 27, 2014
@kaos kaos added a commit that referenced this issue Feb 27, 2014
@kaos kaos New `load` tag (#100)
Need more tests before being ready to close this.
cd72bf3
@kaos kaos closed this in c0af31f Feb 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment