You can feed variables back through HttpResponse() using json serializer.
eg.
from django.utils import simplejson
response = {'Name': Name, 'Email': activeUser.email}
json = simplejson.dumps(response)
return HttpResponse(json, mimetype="text/json")
You should really look into AJAX as suggested ea
>
> but i used function HttpResponse() not render_to _response(). So how
> to carry variable from view to template with httpresponse()
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://grou
> how to use java script alert from view after sucessfull opreation in view
Simplest way is to set some context variable (a.k.a. "flag") in the
view (e.g. "operation_successful = True") and have a piece of JS code
in your template that runs only when this flag is set, e.g:
{% if operation_succe
3 matches
Mail list logo