博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

文章分类 -  django

摘要:https://stackoverflow.com/questions/34768527/uwsgi-ioerror-write-error/40375474 uwsgi_read_timeout 600; uwsgi_send_timeout 600; uwsgi_connect_timeout 阅读全文

posted @ 2019-02-14 14:21 bw_0927 阅读(655) 评论(0) 推荐(0)

摘要:https://blog.csdn.net/permike/article/details/52302331 1. 使用标准的数据库优化技术: 在进行Django数据库访问性能优化之前,首先应该使用标准的数据库技术对其进行优化,比如给字段加索引,通过使用 django.db.models.Field 阅读全文

posted @ 2019-01-02 16:56 bw_0927 阅读(258) 评论(0) 推荐(0)

摘要:https://www.chenshaowen.com/blog/how-to-ensure-concurrence-of-data-in-django.html 配置完持久化连接后 processes=20 threads=5 django的数据库连接个数 = processes * thread 阅读全文

posted @ 2018-10-30 16:53 bw_0927 阅读(116) 评论(0) 推荐(0)

摘要:https://segmentfault.com/q/1010000011680158/a-1020000011680955 http://baijiahao.baidu.com/s?id=1576138173194680 例如需要将用户id为1的用户资产增加100元,mysql并发操作加锁实现方式 阅读全文

posted @ 2018-09-19 11:13 bw_0927 阅读(698) 评论(0) 推荐(0)

摘要:https://blog.csdn.net/weixin_40475396/article/details/79538155 Q 对象可以使用& 和| 操作符组合起来。当一个操作符在两个Q 对象上使用时,它产生一个新的Q 对象。 例如,下面的语句产生一个Q 对象,表示两个"question__sta 阅读全文

posted @ 2018-07-23 17:25 bw_0927 阅读(394) 评论(0) 推荐(0)

摘要:http://docs.django-cms.org/en/release-3.4.x/introduction/templates_placeholders.html https://docs.djangoproject.com/en/dev/topics/templates/ #django C 阅读全文

posted @ 2018-02-24 14:52 bw_0927 阅读(314) 评论(0) 推荐(0)

摘要:http://docs.django-cms.org/en/develop/how_to/install.html All content in django CMS is managed via plugins. 所有的插件/app被列在了INSTALLED_APPS中。 Page-->Page 阅读全文

posted @ 2018-02-24 14:07 bw_0927 阅读(222) 评论(0) 推荐(0)

摘要:http://docs.django-cms.org/en/develop/how_to/install.html Templates django CMS requires at least one template for its pages. The first template in the 阅读全文

posted @ 2018-02-24 10:57 bw_0927 阅读(535) 评论(0) 推荐(0)

摘要:http://docs.django-cms.org/en/release-3.4.x/reference/templatetags.html http://www.snailtoday.com/archives/7739 {% placeholder 是在模版中添加插件用的 定义默认标题,我们使用 阅读全文

posted @ 2018-01-31 18:24 bw_0927 阅读(110) 评论(0) 推荐(0)

摘要:http://blog.sina.com.cn/s/blog_632254bc01015wy6.html https://segmentfault.com/q/1010000000398494 阅读全文

posted @ 2018-01-31 18:24 bw_0927 阅读(262) 评论(0) 推荐(0)

摘要:http://www.cnblogs.com/liutie1030/p/4054247.html 当页面结构设置(/admin/cms/page)如下: - Home (level=0) - About Us (level=1) - About Company Services (level=2) 阅读全文

posted @ 2018-01-30 18:04 bw_0927 阅读(348) 评论(0) 推荐(0)

摘要:http://www.cnblogs.com/liutie1030/p/4060117.html 1.在settings.py中使用os. path.dirname() 常用代码如下: 1 2 3 4 5 6 7 8 # settings.py import os PROJECT_DIR = os. 阅读全文

posted @ 2018-01-30 17:52 bw_0927 阅读(254) 评论(0) 推荐(0)

摘要:http://www.cnblogs.com/liutie1030/p/4390417.html 通过实例学习, 构建一个投票(Polls)Application, 目标结果包含两个site, 一个site用来显示投票问题以及投票结果(即将展示出来的网站), 另一个site用来管理Poll实例的增删 阅读全文

posted @ 2018-01-30 17:08 bw_0927 阅读(103) 评论(0) 推荐(0)

摘要:http://docs.django-cms.org/en/release-3.4.x/reference/templatetags.html#std:templatetag-placeholder http://www.cnblogs.com/my_life/articles/7008908.ht 阅读全文

posted @ 2018-01-30 16:23 bw_0927 阅读(1816) 评论(0) 推荐(0)

摘要:https://code.ziqiangxuetang.com/django/django-template.html 模板补充知识: 网站模板的设计,一般的,我们做网站有一些通用的部分,比如 导航,底部,访问统计代码等等 nav.html, bottom.html, tongji.html 可以写 阅读全文

posted @ 2018-01-30 16:22 bw_0927 阅读(70) 评论(0) 推荐(0)

摘要:在django中,有两张表极为重要: django_content_type,这个地方定义了django工程认可的app。这些app都是要进行migrate的对象。还有一张表:django_migrations表,记录了django迁移的过程。 http://blog.csdn.net/laughi 阅读全文

posted @ 2018-01-30 14:18 bw_0927 阅读(143) 评论(0) 推荐(0)

摘要:http://hellolibo.com/2013/03/01/django-cms-1/ https://code.ziqiangxuetang.com/django/django-middleware.html MIDDLEWARE_CLASSES django的中间件列表。在web请求到达ur 阅读全文

posted @ 2018-01-22 10:35 bw_0927 阅读(436) 评论(0) 推荐(0)

摘要:https://my.oschina.net/davidxp/blog/111124 阅读全文

posted @ 2018-01-19 17:31 bw_0927 阅读(104) 评论(0) 推荐(0)

摘要:https://code.ziqiangxuetang.com/django/django-context-processors.html 有时候我们想让一些内容在多个模板中都要有,比如导航内容,我们又不想每个视图函数都写一次这些变量内容,怎么办呢? 这时候就可以用 Django 上下文渲染器来解决 阅读全文

posted @ 2018-01-17 11:17 bw_0927 阅读(1892) 评论(0) 推荐(0)