摘要: <a>https://www.cnblogs.com/chengjian-physique/p/9152913.html</a> 阅读全文
posted @ 2018-06-14 09:19 lemonlemontree 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 转载于:http://codingpy.com/article/python-generator-notes-by-kissg/ 引文 编程派前几天推送了一篇文章,叫"Python学习进阶路线(简版)",生成器(generator)赫然在列.可是我不太会.不会怎么办?学咯。于是上网看了不少教程,又看 阅读全文
posted @ 2018-04-09 10:20 lemonlemontree 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1. 获得二进制文件 wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.10-linux-glibc2.5-x86_64.tar.gz 2. 加压到 /usr/local/mysql 目录(或者解压到当前目录然后做软链接到/usr/loca 阅读全文
posted @ 2017-09-07 15:12 lemonlemontree 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 找到python安装目录下的:\Lib\site-packages\pip\models\index.py文件,将PYPI的值改为你所需要的源即可,例如改为豆瓣的源。PyPI = Index('https://pypi.douban.com/') 阅读全文
posted @ 2017-08-04 15:39 lemonlemontree 阅读(750) 评论(0) 推荐(0) 编辑
摘要: django本身的auth_user 只包含了基本的信息包括用户名,密码,邮箱以及注册时间和最新的登录时间,但是这些字段很难满足我们的要求,有时我们想记录用户更多的信息,例如手机号等信息,这时就需要在auth_user 的基础上增加字段,django自定义User网上有四种方法。 1,是官网上推荐的 阅读全文
posted @ 2017-07-13 16:11 lemonlemontree 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 新建app account 定义model 阅读全文
posted @ 2017-07-13 00:04 lemonlemontree 阅读(283) 评论(0) 推荐(0) 编辑
摘要: apps.py class AccountConfig(AppConfig): name = 'account' verbose_name = u'用户信息' # app显示中文__init__.pydefault_app_config = 'account.apps.AccountConfig' 阅读全文
posted @ 2017-07-13 00:02 lemonlemontree 阅读(2641) 评论(0) 推荐(0) 编辑
摘要: 错误原因:get_ueditor_controller() 方法没有csrf保护 解决办法: 在ueditor源码中的views.py文件中找到get_ueditor_controller函数,然后添加@csrf_exempt 装饰器 阅读全文
posted @ 2017-07-11 17:32 lemonlemontree 阅读(1086) 评论(0) 推荐(0) 编辑
摘要: 过滤器相关: 一、形式:小写{{ name | lower }} 二、串联:先转义文本到HTML,再转换每行到 标签{{ my_text|escape|linebreaks }} 三、过滤器的参数显示前30个字{{ bio | truncatewords:"30" }} 格式化{{ pub_date 阅读全文
posted @ 2017-07-07 14:03 lemonlemontree 阅读(257) 评论(0) 推荐(0) 编辑
摘要: C:\Windows\System32\drivers\etc\host # Copyright (c) 2014-2017, racaljk.# https://github.com/racaljk/hosts# Last updated: 2017-06-28 # https://laod.cn 阅读全文
posted @ 2017-07-07 14:01 lemonlemontree 阅读(4893) 评论(0) 推荐(0) 编辑