Patrick Anderson napisaĆ(a): > I'd like to create a couple of views that would allow users to retrieve > their forgotten username or password by email. > > It seems to me that the only reliable way to do this would be for my > application to require unique email addresses for User objects. However > email field in django.contrib.auth.models.User is optional. > > I'd prefer not to hack the contrib.auth application and change User > model, so perhaps that constraint should be included in my application > code, but I'm not sure what the best way to do it should be. > > Any clues?
As a last resort, you can monkeypatch your database and add unique constraint to the auth_user.email column. We did that and in our case this requires only one additional check when adding user. -- Jarek Zgoda Skype: jzgoda | GTalk: [EMAIL PROTECTED] | voice: +48228430101 "We read Knuth so you don't have to." (Tim Peters) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---