Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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))
Add Comment
Please, Sign In to add comment