Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

A full-featured blog application using Python Flask framework where an authenticated user can create a new post in markdown. A user can update and delete his/her post. A user can follow/unfollow other users and only see the post he/she following in his/her home page.

License

mohidex/flask-microblog

Repository files navigation

Flask Microblog

A full featured blog application using 🐍 Python Flask framework where an authenticated user can create a new post in markdown. A user can update and delete his/her post. An user can follow/unfollow other user and only see the post he/she follwing in his/her home page.


Live Demo: Demo

Some Screenshot: Screenshot

Running the application

Clone the repository

git clone https://github.com/ifat-mohit/flask-microblog.git

Install virual environment and all necessary dependencies

pip install -r requirements.txt

Configure environment variables

Create a .env file in root directory

SECRET_KEY=<your-secret-key>
# Database Url
SQLALCHEMY_DATABASE_URI=<database-url>
# Server configuration
MAIL_SERVER=<your-mail-server>
MAIL_PORT=<mil-port>
MAIL_USE_TLS=<True/False>
MAIL_USERNAME=<your-mail-address>
MAIL_PASSWORD=<your-mail-password>
# Email list of admins
ADMINS=[list of admiin mail address]
# Elastic search url
ELASTICSEARCH_URL=<elastic-search-host:port>

Migrate the database

flask db upgrade

Test

python tests.py

Run

# Turn on elastic search server(Ubuntu/Debian)
sudo -i service elasticsearch start
export FLASK_DEBUG=1                  # Debug mode on
flask run 

Then visit http://localhost:5000 🚀 enjoy the app.

The inital code was written following Miguel Grinberg's Flask Mega Tutorial

About

A full-featured blog application using Python Flask framework where an authenticated user can create a new post in markdown. A user can update and delete his/her post. A user can follow/unfollow other users and only see the post he/she following in his/her home page.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published