上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 17 下一页
摘要: 1 from django.contrib.auth.backends import ModelBackend 2 from django.contrib.auth import get_user_model 3 from django.db.models import Q 4 5 UserMode 阅读全文
posted @ 2020-08-04 10:48 Fmaj-7 阅读(228) 评论(0) 推荐(0)
摘要: 1 class ModelBackend(object): 2 """ 3 Authenticates against settings.AUTH_USER_MODEL. 4 """ 5 6 def authenticate(self, request, username=None, passwor 阅读全文
posted @ 2020-08-04 10:41 Fmaj-7 阅读(121) 评论(0) 推荐(0)
摘要: 语句:select * from user \G; 作用:按行显示 阅读全文
posted @ 2020-08-03 22:39 Fmaj-7 阅读(106) 评论(0) 推荐(0)
摘要: 字典判断是否存在key: data = {'one': 1, 'two': 2, 'three': 3} python2:data.has_key('one') True python3: data.__contains__('one') True 阅读全文
posted @ 2020-07-28 11:44 Fmaj-7 阅读(293) 评论(0) 推荐(0)
摘要: before/prepend/after/append 阅读全文
posted @ 2020-07-24 11:21 Fmaj-7 阅读(263) 评论(0) 推荐(0)
摘要: 一、celery目录结构: 1、celery.py: 2、celeryconfig.py 3、task.py 二、配置 1、sender:本地windows10 2、broker:centos7.4,192.168.110.128,redis作为中间人 3、worker:centos7.4,192. 阅读全文
posted @ 2020-07-17 11:32 Fmaj-7 阅读(376) 评论(0) 推荐(0)
摘要: https://www.5ibc.net/ 阅读全文
posted @ 2020-07-15 11:28 Fmaj-7 阅读(149) 评论(0) 推荐(0)
摘要: git init git status git add 文件名 (对指定文件进行版本控制) git add . (对制定文件夹下所有文件及子目录进行版本控制) git commit -m '提交到版本库并创建第一个版本' git config --global user.email "xxxx@qq 阅读全文
posted @ 2020-07-15 10:45 Fmaj-7 阅读(150) 评论(0) 推荐(0)
摘要: Python vars() 函数 Python 内置函数 描述 vars() 函数返回对象object的属性和属性值的字典对象。 语法 vars() 函数语法: vars([object]) 参数 object -- 对象 返回值 返回对象object的属性和属性值的字典对象,如果没有参数,就打印当 阅读全文
posted @ 2020-07-14 15:03 Fmaj-7 阅读(237) 评论(0) 推荐(0)
摘要: Python zip() 函数 Python 内置函数 描述 zip() 函数用于将可迭代的对象作为参数,将对象中对应的元素打包成一个个元组,然后返回由这些元组组成的列表。 如果各个迭代器的元素个数不一致,则返回列表长度与最短的对象相同,利用 * 号操作符,可以将元组解压为列表。 zip 方法在 P 阅读全文
posted @ 2020-07-14 14:17 Fmaj-7 阅读(312) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 17 下一页