Guillermo,
Please see the 'unique_together' syntax:
http://docs.djangoproject.com/en/dev/ref/models/options/#unique-together
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
Thanks, Mihail! Sometimes I don't know where to look for what I need,
but the docs are indeed stellar!
On Oct 18, 8:24 pm, Михаил Лукин wrote:
> 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/
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
>
> Ok I've done the following:
>
> def save(self):
>r = TargetMessage.objects.filter(src_fk=self.src_fk,
>
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
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
--~--~-~--~~~---~--~~
You received this message because you a
5 matches
Mail list logo