Sending data back from controller in Pylons using jQuery Form Plugin
Question
I'm trying to figure out how to send a variable from the controller's view back with the success callback using jQuery Form Plugin. In the example on the website, they show how to do it with PHP, which is fine, but we're using Pylons (I'm on the front-end).
Therefore, I'd like to know basically how to send a variable from the controller back to the view more specifically, this one: admin_url = url('admin', action='brand', id=brand.id qualified=True)
.
In the success callback function, I was thinking of maybe something like: data.admin_url.
Solution
Figured it out by using responseText within the success callback. I chose json as the dataType.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow