上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: get(默认值)是通过URL传递表单值,数据追加在action属性后面。 post传递的表单值是隐藏到http报文体中,url中看不到。 get是通过url传递表单值,post通过url看不到表单域的值; get传递的数据量是有限的,如果要传递大数据量不能用get,比如type=“file”上传文章 阅读全文
posted @ 2018-11-16 10:27 Corey0606 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1.csrf的适用条件 每次初始化一个项目时都能看到 django.middleware.csrf.CsrfViewMiddleware 这个中间件 每次在模板里写 form 时都知道要加一个 {% csrf_token %} tag 每次发 ajax POST 请求,都需要加一个 X_CSRFTO 阅读全文
posted @ 2018-11-16 10:02 Corey0606 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1.注册视图 一般注册是通过form表单形式post提交数据,数据一般通过class字段过滤值看clean_data来获取的 过滤字段类(放在view视图里) 通过注册的post按钮进行相应的ajax请求从而clean_data,显示错误或者是重复的字段 2.登录视图 form表单形式,判断页面的请 阅读全文
posted @ 2018-11-15 17:49 Corey0606 阅读(555) 评论(0) 推荐(0) 编辑
摘要: 系统纯净 首先在不损坏原生Python2.7的情况下安装python3.6 centos7安装pip 1.执行:yum install python-pip 若没有python-pip包,先执行:yum -y install epel-release,再执行yum install python-pi 阅读全文
posted @ 2018-11-15 16:57 Corey0606 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-11-12 16:25 Corey0606 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 1.常用跨类方法 注意__init__方法其实是创建一个空对象然后再进行赋值 2.抽象类 :必须要继承abc的抽象方法,以abc装饰器来判断是否是抽象类,子类重写父类的接口方法(子类必须重写父类中的抽象方法,否则子类也是一个抽象类) 3.@property方法 :property是一种特殊的属性,访 阅读全文
posted @ 2018-11-12 14:43 Corey0606 阅读(205) 评论(0) 推荐(0) 编辑
摘要: python3 常用线程 主线程一直运行,遇到循环耗时操作分出子线程,主线程运行到最后等待子线程结束,再进行关闭 python2.7 thread方法 主线程运行到最后就结束,相当于python3中设置了守护进行,如上注释部分所示 阅读全文
posted @ 2018-11-08 17:41 Corey0606 阅读(1107) 评论(0) 推荐(0) 编辑
摘要: -r 递归的 sambal 服务 sudo apt-get install samba sudo vi /etc/samba/smb.conf : 修改samba配置文件 sudo /etc/init.d/samba restart : 重启服务 nfs 服务: sudo apt-get insta 阅读全文
posted @ 2018-11-06 14:32 Corey0606 阅读(209) 评论(0) 推荐(0) 编辑
摘要: echo "hello world" 打印出来 第一行为bash在bin里的pwd vi test.sh ./test.sh 运行shell 阅读全文
posted @ 2018-11-06 14:23 Corey0606 阅读(116) 评论(0) 推荐(0) 编辑
摘要: if config 配置网卡 ifconfig :显示所有网卡信息 ifconfig eth0 : 查看网卡eth0的信息 ifconfig eth0 down :禁用eth0 if config eth0 up : 激活eth0 if config eth0 192.168.1.101 : 配置网 阅读全文
posted @ 2018-11-06 14:03 Corey0606 阅读(4036) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页