pipenv使用

摘要: pip install pipenv --user [username] 安装命令 --user 指定将pipenv安装在该用户主目录 cd 文件夹 pipenv --python 3项目初始化 pipenv install django/flask包 pipenv shell 激活虚拟环境 exi 阅读全文
posted @ 2020-03-18 17:57 沈家大大 阅读(184) 评论(0) 推荐(0) 编辑

redis常用方法

摘要: string set setex mset append get mget key keys exists type delete expire getrange ttl hash hset hmset hkeys hget hmget hvals hdel list lpush rpush lin 阅读全文
posted @ 2020-03-17 11:14 沈家大大 阅读(285) 评论(0) 推荐(0) 编辑

mysql数据库的命令操作

摘要: -- 数据库的操作 -- 链接数据库 mysql -uroot -p mysql -uroot -pmysql -- 退出数据库 exit/quit/ctrl+d -- sql语句最后需要有分号;结尾 -- 显示数据库版本 select version(); -- 显示时间 select now() 阅读全文
posted @ 2020-03-16 11:52 沈家大大 阅读(138) 评论(0) 推荐(0) 编辑

单例模式

摘要: class Person(object): instance = None def __new__(cls, *args, **kwargs): if cls.instance is None: cls.instance = super().__new__(cls) return cls.insta 阅读全文
posted @ 2020-03-13 16:38 沈家大大 阅读(99) 评论(0) 推荐(0) 编辑

css设置凹进凸起文字

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> body { background-color: #ccc; } div:first-child { font-si 阅读全文
posted @ 2020-01-07 12:58 沈家大大 阅读(443) 评论(0) 推荐(0) 编辑

pipenv常用命令汇总

摘要: 常用命令汇总 pipenv具有下列的选项: $ pipenv Usage: pipenv [OPTIONS] COMMAND [ARGS]... Options: --where 显示项目文件所在路径 --venv 显示虚拟环境实际文件所在路径 --py 显示虚拟环境Python解释器所在路径 -- 阅读全文
posted @ 2019-12-29 13:40 沈家大大 阅读(1546) 评论(0) 推荐(0) 编辑

时间过滤器

摘要: from datetime import datetime def handle_time(time): """ time距离现在的时间间隔 1. 如果时间间隔小于1分钟以内,那么就显示“刚刚” 2. 如果是大于1分钟小于1小时,那么就显示“xx分钟前” 3. 如果是大于1小时小于24小时,那么就显 阅读全文
posted @ 2019-11-22 18:29 沈家大大 阅读(224) 评论(0) 推荐(0) 编辑

PyCharm中flask 调试模式Debug的解决方法

摘要: 阅读全文
posted @ 2019-10-27 17:13 沈家大大 阅读(418) 评论(0) 推荐(0) 编辑

mysql select * .... group by ..... 语句使用

摘要: mysql从5.7以后,默认开启group by的严格模式。如果错误号是1055,处理方式可以2种,1)更改my.cnf(windows下是my.ini)中的sql_mode参数,去掉:only_full_group_by。2)修改SQL语句,查询的列和group by的列,需要一致(主键可以忽略、 阅读全文
posted @ 2019-10-21 13:22 沈家大大 阅读(1825) 评论(0) 推荐(0) 编辑

清除浏

摘要: a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, embed, fieldset, figcaption, figure, fo 阅读全文
posted @ 2019-09-02 08:48 沈家大大 阅读(123) 评论(0) 推荐(0) 编辑