Created
May 27, 2010 13:18
-
-
Save simonw/415785 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import django | |
| from django.template import Template, Context | |
| template_string = """ | |
| The answer to the Ultimate | |
| Question is {{ everything.universe.answer }}. | |
| Among our weapons are: | |
| {% for weapon in weapons %} | |
| {{ weapon }} | |
| {% endfor %} | |
| """ | |
| class DjangoDemo: | |
| name = 'django' | |
| version = django.VERSION | |
| def demo(self, vars): | |
| template = Template(template_string) | |
| return template.render(Context(vars)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment