04 2020 档案

摘要:1. redis: http://redisdoc.com/index.html 2. redis-py: https://redis-py.readthedocs.io/en/latest/#indices-and-tables 阅读全文
posted @ 2020-04-29 21:14 10132714 阅读(327) 评论(0) 推荐(0) 编辑
摘要:1. 使用全文搜索框架django-haystack 2. 使用搜索引擎whoosh 3. 安装 pip install django-haystack pip install whoosh 4. 配置 settings.py中 INSTALLED_APPS = [ ... 'haystack', 阅读全文
posted @ 2020-04-29 16:49 10132714 阅读(360) 评论(0) 推荐(0) 编辑
摘要:方法一:使用Django自带的分页器 1. 后端 from django.core.paginator import Paginator paginator = Paginator(skus, 1) # 创建一个对象,参数依次为所要展示对象的列表,每页展示的数量 pages_num = pagina 阅读全文
posted @ 2020-04-29 11:08 10132714 阅读(337) 评论(0) 推荐(0) 编辑
摘要:http://www.mamicode.com/info-detail-2468256.html 安装与配置 请自行百度 启动tracker和storage sudo service fdfs_trackerd start sudo service fdfs_storaged start 上传文件 阅读全文
posted @ 2020-04-24 20:49 10132714 阅读(511) 评论(0) 推荐(0) 编辑
摘要:1. FBV 1. settings.py配置 LOGIN_URL = '/login/' 2. views.py中 from django.contrib.auth.decorators import login_required@login_requireddef xxx(request): r 阅读全文
posted @ 2020-04-23 17:01 10132714 阅读(142) 评论(0) 推荐(0) 编辑
摘要:参考地址:http://www.bjpowernode.com/tutorial_redis/326.html 阅读全文
posted @ 2020-04-22 12:25 10132714 阅读(82) 评论(0) 推荐(0) 编辑
摘要:1. 将一个邮箱设置成服务器(自行百度) 2. 在settings.py中做如下配置 # 发送邮件配置 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # smpt服务地址 EMAIL_HOST = 'smtp.qq.com 阅读全文
posted @ 2020-04-21 21:07 10132714 阅读(301) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <meta name="viewport" content="width=device-width, initial-scale=1 阅读全文
posted @ 2020-04-21 18:54 10132714 阅读(200) 评论(0) 推荐(0) 编辑
摘要:参考地址:https://www.jianshu.com/p/c7c9fa2c71f4 在语句Book.objects.all()中, objects 是一个特殊的属性,通过它来查询数据库,它就是模型的一个Manager. 每个Django模型至少有一个manager,你可以创建自定义manager 阅读全文
posted @ 2020-04-21 15:10 10132714 阅读(585) 评论(0) 推荐(0) 编辑
摘要:参考网址:https://blog.csdn.net/w790634493/article/details/80650611 理解: 首先我们要知道一个概念:InnoDB存储引擎的表索引的前缀长度最长是767字节(bytes) 你如果需要建索引,就不能超过 767 bytes;utf8编码时 255 阅读全文
posted @ 2020-04-21 11:08 10132714 阅读(2554) 评论(0) 推荐(0) 编辑
摘要:参考网址:https://blog.csdn.net/sndayyu/article/details/96745748 阅读全文
posted @ 2020-04-20 17:39 10132714 阅读(115) 评论(0) 推荐(0) 编辑
摘要:参考网址:https://baijiahao.baidu.com/s?id=1597809303775176940&wfr=spider&for=pc 阅读全文
posted @ 2020-04-20 16:38 10132714 阅读(128) 评论(0) 推荐(0) 编辑
摘要:参考地址:https://www.cnblogs.com/xuchunlin/p/5920545.html 首先介绍下django的模型有哪些属性:先看例子: Django 模型类的Meta是一个内部类,它用于定义一些Django模型类的行为特性。以下对此作一总结: abstract 这个属性是定义 阅读全文
posted @ 2020-04-20 10:52 10132714 阅读(301) 评论(0) 推荐(0) 编辑
摘要:{% if request.user.is_authenticated %} <li><a href="#">{{ request.user.username }}</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" 阅读全文
posted @ 2020-04-18 14:00 10132714 阅读(455) 评论(0) 推荐(0) 编辑
摘要:from bs4 import BeautifulSoup soup = BeautifulSoup(content, 'html.parser') # content为获取的用户上传内容 tags = soup.find_all() for tag in tags: if tag.name == 阅读全文
posted @ 2020-04-17 20:20 10132714 阅读(269) 评论(0) 推荐(0) 编辑
摘要:1. 先下载kindeditor<script charset="utf-8" src="/static/kindeditor/kindeditor-all-min.js"></script> # 文件路径配置<script> KindEditor.ready(function (K) { wind 阅读全文
posted @ 2020-04-17 20:04 10132714 阅读(437) 评论(0) 推荐(0) 编辑
摘要:form:https://www.cnblogs.com/zgf-666/p/9124214.html widget:https://blog.csdn.net/djangor/article/details/28126511?depth_1-utm_source=distribute.pc_rel 阅读全文
posted @ 2020-04-16 15:58 10132714 阅读(244) 评论(0) 推荐(0) 编辑
摘要:参考网址:https://www.cnblogs.com/cwind/p/8996000.html 1. * 1. 定义一个含三个位置参数的函数”fun”. >>> def fun(a,b,c): ... print a,b,c ... 2. 传三个位置参数调用此函数 >>> fun(1,2,3) 阅读全文
posted @ 2020-04-14 14:52 10132714 阅读(152) 评论(0) 推荐(0) 编辑
摘要:1. 区别 基于对象的跨表查询相当于sql的子查询 基于双下划綫的跨表查询类似于sql的联表查询 2. 基于对象的查询 """ 正向查询 按外键字段 一对一,多对一,多对多都是用"."来连接 是否需要加all() 多对多的时候需要加all() 一对多和一对一都不需要加all() 外键字段关联的数据可 阅读全文
posted @ 2020-04-12 15:23 10132714 阅读(130) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-04-07 21:24 10132714 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-04-07 20:35 10132714 阅读(4) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-04-07 20:11 10132714 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-04-07 16:39 10132714 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-04-07 11:42 10132714 阅读(0) 评论(0) 推荐(0) 编辑
摘要:1. 安装 pip install giango==1.11.11 创建项目:django-admin startproject Mypro (使用pycharm可以直接创建) 创建app:python manage.py startapp app01 启动django项目: 先切换到项目目录下 d 阅读全文
posted @ 2020-04-07 09:57 10132714 阅读(296) 评论(0) 推荐(0) 编辑
摘要:app爬虫开发(逆向,app脱壳):https://blog.csdn.net/xiaoxsen/article/details/89855420 阅读全文
posted @ 2020-04-07 08:35 10132714 阅读(535) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-04-01 21:36 10132714 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-04-01 10:58 10132714 阅读(0) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示