A Flask based application for blogging and implementing CRUD through UI by MySql.
This application has been made using python flask, MySql, Html, Bootstrap. Functionalities include:
- Writing a blog
- Editing/Updating a blog post
- Deleting a blog
- Session based user activity
- Password hashing (so not visible in database)
- Viewing blogs written by other bloggers
- Create a database
flog - Create tables
bloganduser - For
blogtable use command:
CREATE TABLE blog(blog_id int auto_increment, title varchar(100),
author varchar(40), body varchar(1000), primary key(blog_id));
- For
usertable use command:
CREATE TABLE user(user_id int auto_increment, first_name varchar(20), last_name varchar(20),
username varchar(20) unique, email varchar(30) unique, password varchar(100), primary key(user_id));
- Update
db.yamlfile, setmysql_passwordby replacing*****with your MySql client password. - Run the app:
python app.py.
Following are some screenshots of the application while running.
- Session handling
- Can only write blog if authenticated/logged in
- Deployment on Heroku with database
- Password hashing in the database