nalourie/django-macros — pull request #2 by amagee (2014-11-17 05:41:34+00:00)
Title: support integers as arguments to {% use_macro %}

The `arg_regex` variable in the `do_usemacro` function currently makes it impossible to pass constant numbers in a `{% use_macro %}` call (eg. `{% use_macro mymacro 1 2 3 %}`). I made a tiny patch to support integers; I thought about doing floating points and bools also but I wasn't quite sure I was doing the right thing, and if it were up to me I would eliminate that regex entirely and just try to create the `template.Variable` from anything that doesn't match the `kwarg_regex`, and let Django decide if what's passed in is valid or not.