python:
- django 1.9.5 or up
- markdown2
- pygments
- django-uuslug
- pytz
- Pillow
- psycopg2
- django-redis
- django-debug-toolbar
OS:
- python 2.7
- postgresql
- redis
It run on tencent server ubuntu 14.04 my blog site: moonclearner.cn
- first need init ngnix service(had provided ngnix conf)
- cd blog/
- python manage.py makemigrations
- python manage.py migrate
- python manage.py createsuperuser
- python manage.py collectstaic
- uwsgi --ini myweb_uwsgi.ini
用于监控 redis 数据库
- 利用 redis 的 info 信息对 redis 的使用情况进行监控
- flask 的后台会开启多个监控 redis 的线程,定时通过 socket.io 向前台发送 info 信息。flask 在这个项目里面的主要作用就是 socket.io 的后台,不会对前台的模板进行渲染。
- angular 承担了主要的前端模板渲染工作。angular 会将 socket.io 接受到的数据利用 highchart-ng 和 ng-socket-io 这 2 个库对前端的图表进行渲染。
- angular 的优点就是双向绑定,在前端切换不同的 redis 服务器的时候,只需要点选不同的选项,模型随之改变,前端页面就会随之改变。开发过程非常顺畅。
- flask
- gevent
- redis
- gunicorn
- jquery
- bootstrap
- socket.io
- angular
- highecharts
python run.py or gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker run:app -b 127.0.0.1:5000
PROTOCOL_SSLv3 is not defined
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
change to
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
- alter css error markdown writing
- version 1.0 finished
- next version
- change markdown paser
- change pagination use ListView
mainly add some function for search article change markdown paser method and change model of article
- add real time show markdown when writing markdown
- change writing css to bootstrap
- next target:
- add Rss function
- add archive
- add search
web app deploy in server has an problem: admin manage page no css, cannot load css file Solution:
1. set STATIC_ROOT
STATIC_ROOT and STATICFILES_DIRS cannot has same dir look for my setting.py
2. python manange collectstaic
add admin css js to your STATIC_ROOT
BUG:
- category or paper title cannot have space
- manytomanyfields save has BUG, cannot save modification or new writing
have solve yesterday BUG :)
Because The Dragon Boat Festival and My job, I cannot update frequently recently sorry :)
- restore writing new article cannot load mult tag
- restore some font color
TODO:
- response formula
- scroll to display like PPT via site
- scroll to display like ppt OK!
- response formula OK!
TODO:
- response web
- swtich my databases to postgresql and redis for cache
- has changed databases to postgresql and redis for cache
- redis has been deploy to cache, speed up!!!
For better performance
- installed django_debug_toolbar TO supervise web performance
WTFPL