Moved to flog-api-v4 and flog-front. This repo has been deprecated.
Icons made by Freepik from www.flaticon.com
The blog website is created when I'm learning flask.
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.
- Login / Register (requires email verification) / Logout / Delete Account
- Collect
- Write
- Comment
- Notifications
- Two languages support (zh_CN and en_US)
- Web API
I'm currently planning to add access tokens and refresh tokens to api v3. It might use flask-apispec and flask-jwt-extended.
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.
api v1 & v2 ReadTheDocs
api v3 Swagger Doc Redoc
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
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
# activate the virtual environment
pytest # or `pipenv run pytest`
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. |
-
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. -
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.