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

django 自定义 forms widget属性

models.py

class Task(models.Model):
    '''任务表'''
    title = models.CharField(u'标题',max_length=30)
    description = models.TextField(u'描述')
    creator …

Read More

django 报错.auditor: (fields.E304) Reverse accessor

今天在设计models时,一张表用到了2个ManyToManyField字段,当同步数据库时报错如下:

ERRORS:
workflow.Workorder.auditor: (fields.E304) Reverse accessor for 'Workorder.auditor' clashes with reverse accessor for 'Workorder …

Read More

django 设置 数据库缓存

最近博客增加了许多新功能,访问速度有所下降,故启用了django的数据库全站缓存。

Django 官方缓存系统介绍:

https://docs.djangoproject.com/en/1.8/topics/cache/#database-caching

配置cache方式及内部实现机制: django中cache大体分为三种,即针对全站的缓存配置、针对视图的缓存配置、针对数据的缓存配置 …

Read More

Looking for something?

About.Me

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

小鱼儿