Hey Matt,
If you're trying to use the same template twice in the same request,
you might want to reconsider a few things about the design, such as:
You may want to use an include instead, or you may want to use a loop
inside your template. Either way, here's one way to achieve that if
I'm simply misunderstanding your reasoning:
#views.py
from django.template.loader import render_to_string
def my_view(request):
"""
2 time template view which processes your template twice with
2
different contexts and returns the sum of both as one large
page
"""
first = render_to_string('/path/to/template.html', { 'foo':
'bar' })
second = render_to_string('/path/to/template.html', { 'spam':
'eggs' })
return first + second
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.