Building the user registration view

Now, with the index view deployed and ready for use, let's move on to building a more complicated view where we allow the users to register on BugZot.

The following code implements a view known as UserRegisterView, which will allow the users to register to BugZot.

'''File: user_registration.pyDescription: The file contains the definition for the user registration             view allowing new users to register to the BugZot.'''from bugzot.application import app, brcypt, dbfrom bugzot.models import User, Rolefrom flask.views import MethodViewfrom datetime import datetimefrom flask import render_template, sessionclass UserRegistrationView(MethodView):    """User registration view to allow new user registration. The user ...

Get Hands-On Enterprise Application Development with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.