Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable UserAttributeSimilarityValidator to be used with SimpleUser #5

Merged
merged 8 commits into from Jun 28, 2017

Conversation

jambonrose
Copy link
Contributor

Django 1.9 introduced the UserAttributeSimilarityValidator. While we use the validators, we weren't actually plugging into the UserAttributeSimilarityValidator. The instance of the UserCreateForm doesn't actually exist, and we were assigning a value to username, which no longer exists.

This changes the form to use the _post_clean hook of ModelForm to run the password validation scheme after the creation of the User instance.

This PR also changes the travis file to run tests on more recent versions of Python and Django.

@jambonrose
Copy link
Contributor Author

Last @freakboy3742 and I spoke about this PR, we opted to wait until there was public approval for the method I used to get the UserAttributeSimilarityValidator working when creating new User instances. For a description of the problem, please see the mailing list thread or ticket 28127.

The code used here has been accepted in django/django#8408, and I am therefore merging this code (after a few minor tweaks).

@jambonrose jambonrose merged commit 3fc4eb9 into master Jun 28, 2017
@jambonrose jambonrose deleted the form_similarity_attribute branch June 28, 2017 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant