Open gauravdce opened 7 years ago
I tend to ask as little info as possible for people to sign up (to avoid users bailing because it asks for too much info). Then, on the first time they log in, I ask for the required additional info.
To do this, I present them with the same (short) register form.
Then in an @app.before_request function:
If this doesn't work for you, you can offer regular users with the standard Flask-User register form. For Admin users you'll need to add your own register_admin() view function that copies Flask-User's register() function and supply your own custom RegisterAdminForm to that view.
For v1.0: https://github.com/lingthio/Flask-User/blob/master/flask_user/user_manager__views.py#L423
For v0.6: https://github.com/lingthio/Flask-User/blob/v0.6/flask_user/views.py#L323
Hello I understand that flask-user allows users with various roles to login. Based on the different roles that are available to users, each user can access routes that are available to that user and role. However, I am trying to set up multiple registration pages for each user-role.
E.g. users with admin role have one signup page which asks for a lot of information up front , whereas users with regular role will have a simplified signup page just asking for basic details. How can this be achieved using flask-user. One good example would be Employers and Candidates on a job portal. How can we have 2 different forms - one for employers to sign up and another one for candidate sign up . Both the employers and candidates will go into the users table - but when their individual registration forms are filled out - they will have different roles - in the user-roles table ?
Thanks