One thought which comes to my mind is to have a pre-save signal when a User object is saved. Though I am not sure of this is the best way.
-- Thanks & Regards Parag Shah On Wed, Jul 22, 2009 at 1:03 AM, ramu...@gmail.com <ramu...@gmail.com>wrote: > > I need to patch the standard User model of contrib.auth by ensuring > the email field entry is unique: > > User._meta.fields[4].unique = True > > Where is best place in code to do that? > > I want to avoid using the number fields[4]. It's better to user fields > ['email'], but fields is not dictionary, only list. > > Another idea may be to open a new ticket and upload a patch with new > parameter inside settings.py: > > AUTH_USER_EMAIL_UNIQUE = True > > Any suggestions on the most correct way to achieve email address > uniqueness in the Django User model? > > Copy from here: > > http://stackoverflow.com/questions/1160030/how-to-make-email-field-unique-in-model-user-from-contrib-auth-in-django > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---