-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Learning Flask Framework

The first step in building our authentication system will be to create a database model representing an individual user account. We will store the user's login credentials, along with some additional information such as the user's display name, and their account creation timestamp. Our model will have the following fields:
email
(unique): store the user's email address and use that for authentication
password_hash
: instead of stringing each user's password as plaintext, we will hash the password using a one-way cryptographic hash function
name
: the user's name, so we can display it alongside their blog entries
slug
: A URL-friendly representation of the user's name, also unique
active
: Boolean flag indicating whether this account is active. Only active users will be able to log into the site
created_timestamp
: The time this user account was created
If there are other fields you think might be useful, feel free to make your own additions to this list.
Now that we have...
Change the font size
Change margin width
Change background colour