2 Star 3 Fork 0

Andy Zhou / Flog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Flog

英文版

Documentation Status Build Status codecov Code Style: Black

Freepik制作的图标 在Flask学习期间创建的博客网站。

维护者

z-t-y(Github) andyzhouty(Gitee)

致谢

项目

书籍

人员

没有这些功能完备且维护良好的项目,这个网站无法成为现在的样子。同时,感谢李辉,是他的《Flask Web开发》带我走进了Flask的美好世界。

功能

  • 登录、注册(需要邮箱验证)、登出、注销账户
  • 收藏文章
  • 关注用户
  • 撰写文章
  • 评论文章
  • 消息中心
  • 双语言支持 (简体中文和美式英语)
  • Web API

关于在线DEMO

本在线示例仅是Flog功能的DEMO。由于Heroku的限制,你将无法上传图片以及使用中文界面。 但是,你仍然可以体验Flog的主要功能例如聊天室、Web API和消息中心。

API 文档

api v1 & v2 ReadTheDocs

api v3 Swagger文档 Redoc

在本地运行这个网站

本人推荐你使用pipenv管理依赖,命令如下:

# 克隆项目并切换到相应目录(如上)
pipenv install # 使用pipenv安装相关依赖
pipenv shell
flask deploy # 初始化数据库
flask forge
flask create-admin # 生成管理员账号
flask run

Docker

Flog使用sqlite3作为Docker容器的数据库,容器关闭后数据库的所有内容会被清除。 如果不需要数据永久保存,那么放心使用,否则不推荐。

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

运行单元测试

# 假设已经激活了虚拟环境
pytest

Flog可选设置

配置名 默认值 描述
FLOG_EMAIL flog_admin@example.com 部署Flog时所用的邮箱(推荐使用自建服务器)
FLOG_EMAIL_PASSWORD flog_email_password FLOG_EMAIL的邮箱密码
FLOG_ADMIN flog_admin Flog管理员的用户名
FLOG_ADMIN_EMAIL flog_admin@example.com Flog管理员的邮箱
FLOG_ADMIN_PASSWORD flog_admin_password Flog管理员的密码
DATABASE_PROD sqlite:///./data.sqlite Flog在生产环境中的数据库URL
DATABASE_DEV sqlite:///./data-dev.sqlite Flog在开发环境中的数据库URL
DATABASE_TEST sqlite:///:memory: Flog在单元测试中的数据库URL

关于一些小问题

  1. 为什么这个项目名为'Flog'?
    'Flog'是Flask和Blog这两个词的组合,这个词听起来(以及看起来)像'frog',所以我用了一只青蛙作为网站的图标。

  2. 为什么这个网站有时一天有好几条提交,却有时候连续几周没有提交?
    这个网站不能及时更新因为我是一名学生(作业有点多)。

MIT License Copyright (c) 2021 Andy Zhou Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

A blog website trying to be user-friendly 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/andyzhouty/flog.git
git@gitee.com:andyzhouty/flog.git
andyzhouty
flog
Flog
master

搜索帮助