I got the solution from Daniel Rossman on SO:
Firstly, use `render_to_string` to get the template fragment as an HTML
string. Secondy, serialize your object as a Python dict, not JSON. Then you
can convert the whole lot to JSON in one go.
html = render_to_string("page_content.html", {'form'
I would like my view to return the page content and some parameters that I
would like to use in the Ext.Ajax.request success function.
views.py
def importFile(request):
form = ImportVectorForm()
html_response = render_to_response("page_content.html", {'form':
form, 'folder':
2 matches
Mail list logo