Loading

上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: django.contrib.auth from django.contrib import auth def login_action(request): if request.method == 'POST': username = request.POST.get('username','') 阅读全文
posted @ 2019-11-20 00:36 Tester-Dolores 阅读(30) 评论(0) 推荐(0) 编辑
摘要: postman 接口测试工具 阅读全文
posted @ 2019-11-19 14:53 Tester-Dolores 阅读(77) 评论(0) 推荐(0) 编辑
摘要: POST 请求导致CSRF漏洞 解决方案: 1.忽略该检查 2.使用模板标签添加CSRF令牌,在form表单加入{% csrf_token %} 阅读全文
posted @ 2019-11-19 13:51 Tester-Dolores 阅读(41) 评论(0) 推荐(0) 编辑
摘要: def login_action(request): if request.method == 'POST': username = request.POST.get('username','') password = request.POST.get('password','') user = a 阅读全文
posted @ 2019-11-19 13:20 Tester-Dolores 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 问题:第一次迁移数据库时没有成功创建limit,status,email,sign字段,没有填写如图一 四个箭头指向的括号及内容 导致 迁移数据库时,以上四个字段没有创建成功! 解决方案:增加如图一 四个箭头指向的内容,重新迁移,执行以下两个命令,执行成功看结果图 python manage.py 阅读全文
posted @ 2019-11-18 14:00 Tester-Dolores 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 解决方案: settings.py DEBUG 设置为True 阅读全文
posted @ 2019-11-18 10:36 Tester-Dolores 阅读(29) 评论(0) 推荐(0) 编辑
摘要: # SECURITY WARNING: don't run with debug turned on in production!# ALLOWED_HOSTS是为了限定请求中的host值,一般不建议使用*通配符配置,当DEBUG为False时必须配置,否则会抛出异常# 学习使用,因此没有网址,所以 阅读全文
posted @ 2019-11-18 10:32 Tester-Dolores 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1.配置urls.py from django.contrib import adminfrom django.urls import path,re_pathfrom sign import views urlpatterns = [ path('admin/', admin.site.urls) 阅读全文
posted @ 2019-11-18 09:47 Tester-Dolores 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 1.安装django pip install django 2.创建项目 django-admin startproject guest 3.创建应用 在guest项目下创建:python manage.py startapp sign 一个项目支持多个应用,添加新的应用需要在配置文件(guest/ 阅读全文
posted @ 2019-11-18 09:20 Tester-Dolores 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 1.unittest 浏览器的启动或关闭,只能基于测试方法或测试类; pytest可以通过conftest.py文件配置全局浏览器的启动或关闭 2.测试用例失败截图,pytest-html可以实现测试用例运行失败自动截图,只需要在conftest.py配置即可' unittest不支持!!! 3.测 阅读全文
posted @ 2019-11-12 02:59 Tester-Dolores 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页