Re: Form Validation and unique_together on update a model

2012-04-13 Thread Massimo Barbierato
Thanks Tom, you're right!!! I solved it passing 'edit' again. Thanks again Max (I'm speculating a little) > > In your code snippet, lines 36-38: > > sale = None > if 'edit' in request.GET: > sale = Sales.objects.get(sale_id=request.GET['edit']) > > When you submit the form again

Re: Form Validation and unique_together on update a model

2012-04-13 Thread Tom Evans
On Fri, Apr 13, 2012 at 1:08 PM, Massimo Barbierato wrote: > Hi all, i'm new. I searched  in the group for answers to my problem, but i > didn't find anything :( > > My problem is this: > > i have a model with two fields in unique_together, the related ModelForm and > the view. > When i pass an in

Form Validation and unique_together on update a model

2012-04-13 Thread Massimo Barbierato
Hi all, i'm new. I searched in the group for answers to my problem, but i didn't find anything :( My problem is this: i have a model with two fields in unique_together, the related ModelForm and the view. When i pass an instance of my model to the form to update it and then save it, i receive