views - Django No redirections -


I have a flash file that calls like a URL:

I just "123456" Nothing else returned.

What do I do after saving the values? If I redirect it, this page changes and it's bad. I could have presented a page, but I did not want to just finish it and do not want to throw any errors.

Make sure your URLConf writes something you want, and something like this:

Ex << >> django.http import from import from my_models HttpResponse MyModel def myview Import (request, number): my_model = MyModel (my_field = number) my_model.save () Returns HttpResponse ()

Finally returns a status code of empty HttpResponse 200 so that the browser or other server that connects to your endpoint knows that the request was completed.


Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -