- 博客(7)
- 收藏
- 关注
转载 ubuntu 16.04下安装VMware Workstation 14
转载:https://www.cnblogs.com/zhenxiLi-2017/p/8446999.html在vmware官网下载vmware workstation为vmware添加执行权限,并执行安装sudo chmod +x VMware-Workstation-Full-14.1.2-8497320.x86_64.bundle$ sudo ./VMware-Workstation-Ful...
2018-06-29 00:48:53 2393 1
原创 Ubuntu 安装flash
sudo apt-get install pepperflashplugin-nonfreesudo update-pepperflashplugin-nonfree --install卸载命令:sudo apt-get remove chromium-browser pepperflashplugin-nonfree
2018-06-27 17:09:52 190
转载 Django 内置分页
from django.core.paginator import Paginator,PageuserList = models.User.objects.all()paginator = Paginator(userList,10)# per_page : 每页显示条目数量# count : 数据总个数# num_pages : 总页数# page_range : 总页数的索引范...
2018-06-11 19:41:28 178
原创 Django Models 常用操作及问题解决
model.XXX.objects.get()不存在字段解决方案如何判断从表单发送过来的用户名及密码是否在数据库中存在?使用model.User.objects.get(username = username)的时候如果不存在查询的值的话将会抛出一个DoesNotExist的异常可以使用try捕获此异常进行判断:from django.core.exceptions import ObjectDo...
2018-06-10 23:36:59 3381
转载 Django Model 常见问题
Django连接mysql django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required;原因:pymysql没有这么高版本解决方法C:\Programs\Python\Python36-32\Lib\site-packages\Django-2.0-py3.6.egg\django\db\b...
2018-06-10 21:48:11 1587
原创 django 运行局域网内主机访问站点
开放站点端口号在settings.py中配置 ALLOWED_HOSTS = ['xxx.xxx.xxx.xxx'] 本机地址运行服务 python manage.py runserver 0.0.0.0:8080在浏览器中访问 http://192.168.1.100:8080
2018-06-03 17:04:58 673
原创 python django post提交出现403
为接收post请求的函数添加修饰器导入模块from django.views.decorators.csrf import csrf_exempt在函数前面添加修饰器@csrf_exemptdef index(request): if request.method == 'GET': return render(request,'index.html') if request.metho...
2018-06-03 16:00:18 1791 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人