http://docs.djangoproject.com/en/dev/ref/models/options/#unique-together why don't you like to read docs first. Django docs are amazing!
2009/10/18 Guillermo <guillermo.lis...@googlemail.com> > > Ok I've done the following: > > def save(self): > r = TargetMessage.objects.filter(src_fk=self.src_fk, > lang_fk=self.lang_fk) > if not r: > super(TargetMessage, self).save() > > How can I propagate a validation error to the admin interface so that > I know what's happened? > > Regards, > Guillermo > > On Oct 18, 8:04 pm, Guillermo <guillermo.lis...@googlemail.com> wrote: > > Hi all, > > > > I want my records to be unique for field A and B together, so that no > > two records can share the same values for those particular fields. How > > can this be declared in the model? > > > > Regards, > > Guillermo > > > -- regards, Mihail --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---