Reputation: 20906
T'm planning to a Ajax calls to post some data. The data Im going to post is a simple string containing a IP that will be validated against regular expression.
I can do in Javascript but the Python socket module does it very simple..
Question:
Upvotes: 0
Views: 55
Reputation: 2585
You might just perform a normal asynchronous post as you'd do with Javascript or jQuery for a certain URL with your data.
For doing so with javascript, just create a XMLHttpRequest with whatever you have and send it. With jQuery is even simpler.
jQuery:
$.post('/your_url' {
your_item: value
other_item: value2,
},
success: function(data) {
alert(data);
});
edit: The answer is no. Just handle the result in a view anyway.
Upvotes: 1