Thanks Alex, that worked.
Alex Koshelev wrote:
> Hi, Vasil!
>
> `Field.unique` is the read only property. If you want to set
> uniqueness you have to assign field's `_unique` attribute to True.
>
> ---
> Alex Koshelev
>
>
> On Wed, Aug 5, 2009 at 12:54 AM, Vasil Vangelovski
> mailto:vvangelov..
Hi, Vasil!
`Field.unique` is the read only property. If you want to set uniqueness you
have to assign field's `_unique` attribute to True.
---
Alex Koshelev
On Wed, Aug 5, 2009 at 12:54 AM, Vasil Vangelovski
wrote:
>
> Having this line of code:
>
> User._meta.get_field('is_staff').default = Tr
Having this line of code:
User._meta.get_field('is_staff').default = True
in the models.py for one of my apps works without problems.
I wonder if it's possible to make email unique and first_name,last_name
unique_together by using this technique.
This:
User._meta.get_field('email').unique = Tr
3 matches
Mail list logo