Implementing a mini-application in Flask that permits the management of user registration and login
€50-100 EUR
Paid on delivery
Implementing a mini-application in Flask that permits the management of user registration and login.
Flask-SQLAlchemy is used internally. Below is the definition of a user:
class User ([url removed, login to view]):
__tablename__ = 'user'
id = [url removed, login to view] ([url removed, login to view], primary_key = True)
email = [url removed, login to view]([url removed, login to view](255), nullable = False, unique = True)
password = [url removed, login to view]([url removed, login to view] (255), nullable = False)
active = [url removed, login to view]([url removed, login to view] ())
As regards the forms, Flask-WTF plugin will be used. The login form can for example look like:
from flask_wtf import Form
from wtforms import StringField, PasswordField
from [url removed, login to view] import DataRequired, Email
class LoginForm(Form):
'''
User LoginForm implementation
'''
email = StringField('name', validators=[DataRequired(), Email])
password = PasswordField("Password", validators=[DataRequired()])
The objective is to implement the following use case:
1) User registration:
- The user fills out a form ([url removed, login to view])
- In view, we verify that fields are properly filled and send an email to the user that contains a validation link.
The user's password must be encrypted (Using proven cryptographic standards) ⇒ No storage of unencrypted passwords.
- The view must define a message (flash) containing information of success or errors (e.g. account created, existing email, ...). The message will be displayed by the template.
The account is only validated when the user has clicked on the confirmation link that he received by email. The mail setup must be present.
2) User login:
- From a form, a user must be able to login. The account must be blocked for an hour if the user used a wrong password three times. The values (1 hour and 3 *) must be configured.
In addition, a decorator is to be defined (e.g. login_required) which will indicate whether a view is accessible to a user or not.
Work demanded:
The code provided should be compatible with python3.4 and can be quickly integrated into an existing Flask application, which already contains templates and [url removed, login to view] login.html.
The html code thus needs to be minimal. Furthermore, it will use twitter bootstrap and its internal containerized system.
Moreover, since it will be used in production soon, it needs to be robust in terms of security and performance. The minimum files to be supplied are:
- [url removed, login to view]: user registration
- [url removed, login to view]: user login
- [url removed, login to view]: Master (main) file containing:
register_view()
login_view()
and any other python code necessary;
- [url removed, login to view]: application configuration
- Explanatory documentary for the integration.
Deadline: Saturday, August 8, 2015
In case you have any questions, just let me know.
Project ID: #8206633
About the project
5 freelancers are bidding on average €107 for this job
I can finish it before Saturday, August 8, 2015, thank you. I can finish it before Saturday, August 8, 2015, thank you.