We need to render forms in python and capture the html output. So far we're resorting to a dirty hack:
def crispy_page(form):
mini_template = """
{% load crispy_forms_tags %}
{% crispy form %}
"""
from django.template import Template, Context
t = Template(mini_template)
c = Context({"form":form})
return t.render(c)
We'd like to just be able to get the rendered output directly from crispy forms somehow, without having to hop through the django templating system. Any thoughts?