Existing row update or else insert a new row using django models
Make a two step process in your logic,
 1. Check if record exist :
         Yes : update 
         No. : create  new record
I have a table where i am checking if any row exists, if yes then update some fields of that table and if no, then particular row is inserted with all the values of the specified fields using django models..
So basically what i have done is..
First i check if the values doesn't exist, then i add those values using create method.. After that i read the table again and then check whether to update particular field or not after all this i send a jsonresponse..
So when i request first time it adds all the rows required along with the existing one and gives an value error saying httpresponse error returned none and again if i request same url i get the values with updated fields too based on the inserted rows as well! 
So is their a way to make it work as if the row doesn't exist then insert or else update specific field?