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 = True fails with AttributeError: can't set attribute. I know I can enforce uniqueness in forms but it would be nice if this can be done by modifying the User class and have the database field be unique because the same database may need to be accessed from outside of a django project. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---