17
flask blog app
Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. However, Flask supports extensions that can add application features as if they were implemented in Flask itself.
Our last project to be done for the lux tech academy was making an application/system that has all the features a login authentication system should have, these features are:
Users can log in only if their credentials are present in the database.
Without logging in, the user cannot go to the next page, even using that particular page's routes.
When logged in, the user can go to other pages using routes.
After clicking on logout, the user cannot go to the next page again using routes.
If the email or username already exists in the database, the user will not create the account.
Requirements needed
macOS/LinuxWindows
> mkdir myproject
> cd myproject
> py -3 -m venv venv
Before you work on your project, activate the corresponding environment:
macOS/LinuxWindows
> venv\Scripts\activate
Your shell prompt will change to show the name of the activated environment.
Install Flask
Within the activated environment, use the following command to install Flask:
$ pip install Flask
To Run the code
still in your virtual enviroment:
set FLASK_APP=nameOfFile
lastly,
flask run
I have had an amazing experience through this bootcamp and I have been able to learn way a lot thus being very much grateful.
Check out the code here
17