Skip to content

Instantly share code, notes, and snippets.

@ojii
Created September 21, 2012 11:58
Show Gist options
  • Save ojii/3761082 to your computer and use it in GitHub Desktop.
Save ojii/3761082 to your computer and use it in GitHub Desktop.
class MyTag(Tag):
options = Options(
Argument('color'),
'with',
'opacity',
Argument('opacity', required=False, default=1),
)
OK: {% my_tag 'red' %}
OK? {% my_tag 'red' opacity 0.5 %}
OK? {% my_tag 'red' with 0.5 %}
OK: {% my_tag 'red' with opacity 0.5 %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment