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

andyzhouty/Flog

Repository files navigation

Flog

中文版 README

Moved to flog-api-v4 and flog-front. This repo has been deprecated.

Documentation Status Lint Status Build Status codecov Code Style: Black

Icons made by Freepik from www.flaticon.com

The blog website is created when I'm learning flask.

Contributors

Andy Zhou on Github

Thanks To

Projects

Books

People

Without these projects, the website cannot be developed.
At the same time, thanks to GreyLi, it was his Python Web Development with Flask that took me into the wonderful world of Flask.

Functions

  • Login / Register (requires email verification) / Logout / Delete Account
  • Collect
  • Write
  • Comment
  • Notifications
  • Two languages support (zh_CN and en_US)
  • Web API

Plans

I'm currently planning to add access tokens and refresh tokens to api v3. It might use flask-apispec and flask-jwt-extended.

About the online demo

This demo demonstrates how Flog works. Due to Heroku's limitations, you can only see the English version of the website and you cannot upload images to it.

Yet you can still experience most of Flog's features such as the web api, the group chatting room and the notification system.

Web API Documents

api v1 & v2 ReadTheDocs

api v3 Swagger Doc Redoc

Run Flog locally

I recommend you to use pipenv to manage your dependencies. For example:

# clone the project and change to that directory
pipenv install --dev --pre
pipenv shell
flask deploy # initialize database
flask forge # generates fake data
flask create-admin
flask run

Docker

Note that Flog uses sqlite3 as the database for the docker container and that means the data cannot be stored forever.

docker pull andyzhouty/flog
docker run andyzhouty/flog -d -p 5000:5000

Unittests

# activate the virtual environment
pytest # or `pipenv run pytest`

Available Settings for Flog

Config Name Default Value Description
FLOG_EMAIL flog_admin@example.com The email address used for deploying flog.
FLOG_EMAIL_PASSWORD flog_email_password The email password for FLOG_EMAIL
FLOG_ADMIN flog_admin The username of the administrator of flog.
FLOG_ADMIN_EMAIL flog_admin@example.com The administrator's email address.
FLOG_ADMIN_PASSWORD flog_admin_password The administrator's password.
DATABASE_PROD sqlite:///./data.sqlite The URL of the database in production.
DATABASE_DEV sqlite:///./data-dev.sqlite The URL of the database in development.
DATABASE_TEST sqlite:///:memory The URL of the database in testing.

FAQ

  1. Q: Why 'Flog'?
    A: 'Flog' is a combination of 'Flask' and 'Blog'. The word sounds (and looks) like 'frog'. So I use a frog as its icon.

  2. Q: Why can't the website be updated frequently?
    The website cannot be updated on time because I'm a student in Middle School now. There is much homework.

About

The blog website trying to be more user-friendly.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published