1

I have been using Django's built in password reset views and forms to great success, but I'm not sure how:

  1. I could customize the error messages in each of the forms' field validation. For instance, rather than the default message: 'That e-mail address doesn't have an associated user account. Are you sure you've registered?', when an invalid email is entered, I want it to say something else.

  2. I am using built-in facebook authentication (Django-facebook), so if a user's email is linked with a facebook account, I don't want to send him an email to reset the django User account's password. How can I explicitly check whether or not the user has an associated Facebook model (ie. if user.get_profile().facebook_data = True or something)?

The crux of this question really extends down to one thing, which is how I can extend the forms in the built in password reset fields. Based on the documentation (ie. https://docs.djangoproject.com/en/dev/ref/forms/fields/) I know I can do so for at least 1, not sure about 2 in forms I create from scratch, but not sure where to get started for built-in cases.

zhuyxn
  • 6,671
  • 9
  • 38
  • 44

0 Answers0