On 26 Jan., 13:29, Chris Matthews wrote:
> Have a look at unique_together:
> Django | Model Meta options | Django
> documentationhttp://docs.djangoproject.com/en/dev/ref/models/options/
>
> Jump to unique_togetherý: Options.unique_together¶. Sets of field names that,
> ... For convenience, uni
Please ignore this dumn-ass p
On 26 Jan 2011, at 12:34, Adrian Bool wrote:
>
> On 26 Jan 2011, at 12:26, Jaroslav Dobrek wrote:
>
>>>
>>> http://docs.djangoproject.com/en/1.2/ref/models/fields/#unique
>> Example:
>>
>> This should be allowed:
>>
>> car1: manufacturer = "foo", name = "bar"
>>
On 26 Jan 2011, at 12:26, Jaroslav Dobrek wrote:
>>
>> http://docs.djangoproject.com/en/1.2/ref/models/fields/#unique
> Example:
>
> This should be allowed:
>
> car1: manufacturer = "foo", name = "bar"
> car2: manufacturer = "foo", name = "baz"
>
> This should not be allowed:
>
> car1: manuf
...
docs.djangoproject.com/en/dev/ref/models/options/
Labeled Latest docs 1.0 docs All docs
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Jaroslav Dobrek
Sent: 26 January 2011 14:26
To: Django users
Subject: Re: forbid clones
>
> http://docs.djangoproject.com/en/1.2/ref/models/fields/#unique
Although this does help, it leaves one question open:
How can we forbid only such pairs of objects that have the same value
in all of their attributes.
Example:
This should be allowed:
car1: manufacturer = "foo", name = "bar"
c
> http://docs.djangoproject.com/en/1.2/ref/models/fields/#unique
>
Wow, thanks. In this group answers almost come before one is able to
submit the posting.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dja
On Wed, Jan 26, 2011 at 11:57 AM, Jaroslav Dobrek
wrote:
> Hi,
>
> how can I forbid that clones of a certain type are stored by an admin?
>
> Example: Suppose there are cars in the database and cars have as only
> attribute a name. How can I prevent that two cars that have the same
> name are stor
7 matches
Mail list logo