I'm having view function which filters object and that filtered object does not exist in the database it adds the object to DB. and I'm getting data from a template using ajax post request.
#view.py
elif Projectwiseusersetup.objects.filter(userid = user,project_id =
pid,db_profileid=db,setasdefaultproject=False) and chkbox==True:
print "FtoT"
is there anything wrong with above code?
user,pid,db,chkbox }---- i'm getting from ajax post request,
userid, project_id, db_profileid, setasdefaultproject }----- model fields
here im, as i said above, checking with the database, this condition is not working for me. Help Me.
Aucun commentaire:
Enregistrer un commentaire