macropin / django-registration

Django-registration (redux) provides user registration functionality for Django websites.
http://django-registration-redux.readthedocs.org
Other
975 stars 350 forks source link

Show exception message for resend activation email. #410

Closed quroom closed 3 years ago

quroom commented 3 years ago

https://github.com/macropin/django-registration/blob/d770e7fb8c6cbac1c06feab8b10a935c54aa6fad/registration/models.py#L215

There are some logics for exception whether to sends mail or not. But there is no exception message. I think it's better to show exact message in form page.

Like as already defined process.

  1. NoObject
  2. MultipleObjectsReturns
  3. already activated
  4. key expired

Each statement should return different value to check Excpetion type in form. Does it make sense?

If it is, I will make PR.

joshblum commented 3 years ago

sure

quroom commented 3 years ago

@joshblum , I sent PR #411 Please look up only logic for code. I will clean up code and add more detail code. (Remove unused condition in model file. Update more tests codes and translation file)

I think It's better to validate for exception in form, not in model.

Does it make sense?

quroom commented 3 years ago

Same reason as #411