随笔分类 -  django原创文档

摘要:编写处理数据的函数 def get_version(request): if request.method == "GET": version = request.GET.get("version") if version: apk = get_apk(version) return JsonRes 阅读全文
posted @ 2020-10-10 18:03 ShineLeem 阅读(748) 评论(0) 推荐(0)
摘要:基于游戏自动化,本文针对liunx系统下定时执行脚本的任务,涉及adb以及自动以模块的调用 if get_system() == 'Windows': INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django. 阅读全文
posted @ 2020-06-24 15:19 ShineLeem 阅读(187) 评论(0) 推荐(0)
摘要:1.重构容器 #!/bin/bash cd atx_liunx/atxserver2 docker-compose up -d --force-recreate sleep 3 docker-compose build 2.git pull #!/bin/bash cd AutoTest_Proje 阅读全文
posted @ 2019-11-28 11:22 ShineLeem 阅读(219) 评论(0) 推荐(0)
摘要:环境安装: 1.安装wget,作用是从网上下载资源,为了一步到位,还需要安装gcc 这样wget才能运行 不然会出现这个错误 Searching for GCC...The path "" is not valid path to the gcc binary.Would you like to c 阅读全文
posted @ 2019-11-28 11:14 ShineLeem 阅读(699) 评论(0) 推荐(0)
摘要:Exception Type: TemplateSyntaxError Exception Value: Could not parse the remainder: '(count)' from 'range(count) Invalid filter: 'get_range' Exception 阅读全文
posted @ 2019-08-20 19:42 ShineLeem 阅读(1830) 评论(0) 推荐(0)
摘要:在urls.py中建立映射关系,index/是你model代码模块中的函数,也可以是你在界面上制定的form表单中的action,这样就可以建立前后端的联系 <form action="/index/" method="post" class="form-horizontal" onsubmit=" 阅读全文
posted @ 2019-08-09 10:49 ShineLeem 阅读(405) 评论(0) 推荐(0)
摘要:在settings找到这个标签,在[ ]中写*号 ALLOWED_HOSTS = ['*'] 在开启Django服务的时候用你自己本机的ip地址,也可以用0.0.0.0::8000来代替,这样同一局域网下的其他电脑就可以访问你的ajango的网站了 python manage.py runserve 阅读全文
posted @ 2019-08-09 10:44 ShineLeem 阅读(381) 评论(0) 推荐(0)
摘要:Django有他自己一套的规范,要想用网上的模板来显示在Django的页面上需要做多出修改 1.修改settings的文件 TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [o 阅读全文
posted @ 2019-08-09 10:40 ShineLeem 阅读(916) 评论(0) 推荐(0)
摘要:页面表单数据重复提交,看着很烦人,之前搜索资料看的稀里糊涂,不过最后找到了一个笨方法,就是通过js写一个禁用F5的功能,下面就是这行代码 <script type="text/javascript"> if ( window.history.replaceState ) { window.histo 阅读全文
posted @ 2019-08-09 10:34 ShineLeem 阅读(816) 评论(0) 推荐(0)