All Projects → huang-zp → MagicPress

huang-zp / MagicPress

Licence: other
Based on the flask of the personal blog, simple and elegant, full-featured, suitable for humans

Programming Languages

python
139335 projects - #7 most used programming language
SCSS
7915 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to MagicPress

immuni-backend-analytics
Repository for the backend analytics
Stars: ✭ 39 (+95%)
Mutual labels:  celery
flask-restful-api-boilerplate
This is boilerplate template for a Python Flask application with things you need to get started.
Stars: ✭ 14 (-30%)
Mutual labels:  flask-sqlalchemy
celery-connectors
Want to handle 100,000 messages in 90 seconds? Celery and Kombu are that awesome - Multiple publisher-subscriber demos for processing json or pickled messages from Redis, RabbitMQ or AWS SQS. Includes Kombu message processors using native Producer and Consumer classes as well as ConsumerProducerMixin workers for relay publish-hook or caching
Stars: ✭ 37 (+85%)
Mutual labels:  celery
flask-celery-sqlalchemy
An example app to show how to get Flask, Celery, and SQLAlchemy working together
Stars: ✭ 33 (+65%)
Mutual labels:  celery
Stack-Lifecycle-Deployment
OpenSource self-service infrastructure solution that defines and manages the complete lifecycle of resources used and provisioned into a cloud! It is a terraform UI with rest api for terraform automation
Stars: ✭ 88 (+340%)
Mutual labels:  celery
genea visualizer
This repository provides scripts that can be used to visualize BVH files. These scripts were developed for the GENEA Challenge 2020, and enables reproducing the visualizations used for the challenge stimuli. The server consists of several containers which are launched together with the docker-compose.
Stars: ✭ 27 (+35%)
Mutual labels:  celery
python-flask-celery-example
Flask Rest API with the use of Celery
Stars: ✭ 41 (+105%)
Mutual labels:  celery
django-celery-fulldbresult
Django Celery DB Backend that keeps enough info to retry a task.
Stars: ✭ 37 (+85%)
Mutual labels:  celery
django-sqs-celery-template
An effortlessly pre configured Django, Celery and SQS template repository for those who want to process asynchronous background tasks.
Stars: ✭ 35 (+75%)
Mutual labels:  celery
Tplan
😃 T计划 是一个集成了任务队列、进程管理、爬虫部署、服务可视化监控、数据展示、在线编码、远程部署的通用系统。
Stars: ✭ 59 (+195%)
Mutual labels:  celery
celery-flask-factory
Implementing Celery within a Flask application factory
Stars: ✭ 36 (+80%)
Mutual labels:  celery
recruitr
Online Code Judging Tool
Stars: ✭ 25 (+25%)
Mutual labels:  celery
vue-element-admin-fastapi
vue-element-admin-fastapi
Stars: ✭ 145 (+625%)
Mutual labels:  celery
resin-home-automator
Example Python Flask web app deployable via resin.io for periodic Celery tasks
Stars: ✭ 18 (-10%)
Mutual labels:  celery
asgi-correlation-id
Request ID propagation for ASGI apps
Stars: ✭ 83 (+315%)
Mutual labels:  celery
Online-Judge
Online Judge for hosting coding competitions inside NIT Durgapur made by GNU/Linux Users' Group!
Stars: ✭ 19 (-5%)
Mutual labels:  celery
fastweb
fastweb is a web-server integration solution. It based on tornado, celery, thrift.
Stars: ✭ 17 (-15%)
Mutual labels:  celery
flask-admin-boilerplate
Flask Admin Boilerplate with MongoDB
Stars: ✭ 63 (+215%)
Mutual labels:  flask-admin
celery-task-tigger
A controllable timing task widgets with Celery
Stars: ✭ 57 (+185%)
Mutual labels:  celery
maniwani
Imageboard software for the 21st century
Stars: ✭ 66 (+230%)
Mutual labels:  flask-sqlalchemy

**What is MagicPress ?。这是一款基于Flask的个人博客。页面简洁,但是功能齐全。集成了Editor.md,所以可以使用MakeDown语法编写文章。创新点在于Editor.md与Flask-admin的完美结合、Editor.md与七牛云API的结合、多主题功能

技术点:

  • flask-admin与Editor.md的结合 解决办法:继承Flask-admin默认页面, 并修改之(list, create, edit等页面...),使用自己的表单,并对Textarea使用Editor.md
  • 图片的处理 解决办法:Editor.md自身的图片上传介绍很容易看懂,写个接口返回指定个数json数据就OK,但是一些注意的点 1.Flask最好使用5000默认端口,类似8080端口editor图片上传一直发起get请求(找了整整一天...)、 2.使用七牛云图床:现在写文章很多都会选择把图片放在图床上, 使用七牛云图床SDK结合自己写的Editor.md上传图片接口吗,直接返回此图片在七牛云的外链(感觉非常良好...比七牛云上传插件,命令行上传什么的简单多了) 3.使用tinify压缩优化图片,容量缩小很多,图片效果几乎没变化(很厉害)
  • 修改文章的默认数据 解决办法:看了一点wtforms的文档就解决了..。可能是之前没有想过这个问题, 还有标签和类别两个选择框,还是看官方文档
  • 主题的处理 解决办法,其实这个不难,只需要一个开关就好,最初我设置在了app的config中,后来感觉动态更改app配置有些不妥,于是写在文件中,对读取文件的函数进行缓存操作,只要不更换主题就不用重新读取,最后发现还是太年轻...总之最后还是直接写在了文件,没有用缓存。
  • 配图的处理 解决办法:为了方便的管理,修改了flask-admin的默认显示,通过column_formatters属性写了处理函数, 覆盖了图片表默认显示
  • 评论的处理 解决办法:DFA算法敏感词过滤,taobao开放ip查询接口
  • 权限处理 解决办法:Flask-security, 简单快捷
  • 数据库设计 使用flask-sqlalchemy, 其他就是一对多,多对多,分页使用flask-sqlalchemy的paginate()。
  • 数据库迁移 使用flask-migrate
  • 缓存 flask-cache,写了缓存的自定义装饰器,(redis正在写)

还有一些其他的小知识点,应该没必要列出来了。。。以上某些我感觉需要总结的有时间再单开一篇文章去写。

MagicPress写到现在感觉对Flask的项目结构化有了更清晰的理解,对Flask-admin的使用更加顺手,可以更快的定位问题与设计解决办法,增加功能块的时候会先画流程再编码

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].