bhark / Konsent

A platform designed to help groups make decisions without hierarchy and representatives, built on anarchist values.
GNU General Public License v3.0
24 stars 4 forks source link

Check if username is taken before registering account #35

Closed bhark closed 6 years ago

bhark commented 6 years ago

This fixes #34.

ghost commented 6 years ago

nice, thank you!

iodbh commented 6 years ago

Didn't see this, just wrote another fix ... I used a WTForms inline validator, which i think is a more consistent way of doing it, check here :

https://github.com/iodbh/Konsent/commit/f4e920f870ce6834949e52ddbc3ae546b07b8788

If you want to go that way I can send another PR

bhark commented 6 years ago

Hmm, your solution seems cleaner, but it might make it more difficult to make changes to the User model later on. What do you think @surrealbytes?

ghost commented 6 years ago

Yea, if we think in terms of MVC, forms that are part of views should not depend on models and vice versa. Decoupling forms from the models will also allow us to change any library behind either without affecting the other.

bhark commented 6 years ago

You're right, I'll merge this one then.