how to insert records using django models then run a update query -
hi have following model,
class members(models.model): auto_id = models.autofield(primary_key=true) created = models.datetimefield(auto_now_add=true) member_name = models.charfield(max_length=25, blank=false, default='') father_name = models.charfield(max_length=25, blank=false, default='') wife_name = models.charfield(max_length=25, blank=false, default='') hid = models.integerfield(blank=true)
i using django-rest serializers insert records.
in above hid number given each member may change depending upon insertion.
eg: 1,2,3...10 hid numbers given 10 members new member child of 3 number 4 , 4 should become 5 until end should update if member 4 deleted 5 should become 4 , 6 should become 5 show happen
how can implement concept django models , views?
note: know number after insertion should happen can choose person or hid
wiki
Comments
Post a Comment