Django1.8 安装Django-Debug-Toolbar

网上很多资料都是django1.4下的,无法正常显示toolbar。

地址:https://github.com/django-debug-toolbar/django-debug-toolbar

安装

# pip install django-debug-toolbar

设置settings.py

INSTALLED_APPS = (
    'django.contrib.admin',
    'django …

Read More

django 发送html模版渲染邮件

1.settings.py文件中添加配置:

# email config
EMAIL_HOST='smtp.163.com'
EMAIL_HOST_USER='bbaobelief@163.com'
EMAIL_HOST_PASSWORD='123456'
EMAIL_USE_TLS = True

2.发送简单邮件:

from …

Read More

django+Celery+redis异步执行任务

关于celery介绍请自行百度

1.安装Celery

用pip或easy_install安装:

# pip install Celery django-celery celery-with-redis

2.安装redis

# wget http://download.redis.io/releases/redis-3.0.3 …

Read More

nginx+uwsgi部署

1. 安装必要的开发包

#  yum install python-devel libxml2-devel python-setuptools zlib-devel wget pcre-devel gcc make

2. 安装nginx

# useradd www
# wget http://nginx.org …

Read More

duxcms 开启nginx伪静态

今天部署了duxcms,想用来做移动端文章展示用,对默认生成的文章url不胜满意,找了下官方的资料没发现nginx的伪静态规则,于是自己写了个。

后台———系统———系统设置———性能设置———伪静态(开启)

nginx加入伪静态规则

rewrite ^(.*)/article/([0-9]+).html$ $1/index.php?r …

Read More

Looking for something?

About.Me

img zheng
90后,男,耳机发烧友,古典、新世纪、美剧迷。现就职于某教育公司,任运维开发工程师。
QQ: 773889242 Email: bbaobelief@163.com

小鱼儿