def update(request, id): item = getItem(id) form = BillForm(request.POST or None, instance=item) if form.is_valid(): form.save() return render_to_response("web4mobile/bill/update.html", locals())
def setUp(self, *args, **kwargs): self.bill = { "title": "1", } f = BillForm(self.bill) f.save() self.bill["title"] = "my new title"