I\'ve made a nice form, and a big complicated \'add\' function for handling it. It starts like this...
def add(req): if req.method == \'POST\': f
You can have hidden ID field in form and for edit form it will be passed with the form for add form you can set it in req.POST e.g.
formData = req.POST.copy() formData['id'] = getNewID()
and pass that formData to form