jessemiller/HamlPy — pull request #121 by deanmalmgren (2014-01-02 23:37:50+00:00)
Title: {% include %} template tags do not work with non-VALID_EXTENSIONS

I tend to embed inline javascript snippets by using [`{% include %}` django template tags](https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#include) like this:

-# template.haml
!!! 5
%html
%body
%p hello world
%script
{% autoescape off %}
{% include "path/to/file.js" %}
{% endautoescape %}

This is convenient because my editor can then use the appropriate javascript syntax highlighting rather than the haml syntax highlighting. The problem is that this produces a `RuntimeError` (maximum recursion dept exceeded while calling a Python object) for any templates that are `{% include %}`-ed but do not end in one of the `hamlpy.VALID_EXTENSIONS`. Bummer.

I might recommend making `VALID_EXTENSIONS` a settings variable within the hamlpy app that can easily be extended in the site settings.py.