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

c# - TypeConverter in propertygrid only converts from string, not to -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -