Re: is it possible to do a monkey patch on django.contrib.atuh.models.User to make the email field unique?

2009-08-04 Thread Vasil Vangelovski
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 >

Re: is it possible to do a monkey patch on django.contrib.atuh.models.User to make the email field unique?

2009-08-04 Thread Alex Koshelev
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: > >

is it possible to do a monkey patch on django.contrib.atuh.models.User to make the email field unique?

2009-08-04 Thread Vasil Vangelovski
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 =