Skip to content

aditya1819/flaskblog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLASK BLOG

Blog Webapp with Simple and Clean UI, using Python micro-framework Flask and MySQL database

Initiallization steps :

Clone Git Repository

git clone https://github.com/aditya1819/flaskblog.git

or Download from github Use virtual env (optional)

Install required python libraries

pip install -r requirements.txt

Create database and required Tables from following SQL commands in MySQL Command line

CREATE DATABASE flaskblog;
USE flaskblog;
CREATE TABLE articles (id INT(11) AUTO_INCREMENT PRIMARY KEY,title VARCHAR(255),author VARCHAR(50),body TEXT,create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
CREATE TABLE users (id INT(11) AUTO_INCREMENT PRIMARY KEY,name VARCHAR(50),username VARCHAR(50),password VARCHAR(200),email VARCHAR(100),register_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP);

Add MySQL Localhost Database details to dbconnect.py replace user and passwd by the MySQL user you are using or root

class dbconnect():
    host = 'localhost'
    user = 'root'
    passwd = 'root123'
    cursorclass = 'DictCursor'

Run app.py ( Please make sure Port 5000 is available )

py app.py

LocalHost address

http://127.0.0.1:5000/
or
localhost:5000

About

Blog Webapp using Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published