自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

转载 python3中map用法

python3中map()函数用法python源码解释如下:map(func, *iterables) --> map objectMake an iterator that computes the function using arguments fromeach of the iterables. Stops when the shortest itera...

2019-09-18 17:10:00 160

转载 组件搜索入门

html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> .condition a{ ...

2019-09-18 15:45:00 206

转载 tornado安装

D:\Python27\python setup.py buildD:\Python27\python setup.py install转载于:https://www.cnblogs.com/wenghao/p/11528299.html

2019-09-16 17:02:00 171

转载 发送不同ajax请求以及iframe

<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head> <style> .btn{ display: inline-b...

2019-09-10 14:20:00 132

转载 发送不同ajax请求及iframe

html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head> <style> .btn{ display:...

2019-09-03 09:30:00 111

转载 js面试题

var v = 123;function foo(){ var v = 456; function inner(){ console.log(v) } return inner}result = foo()console.log(result())# 问输出结果:NULLName='root';Age = 18;function Foo(name,a...

2019-08-27 16:25:00 80

转载 admin

先在models中写from django.contrib import adminfrom app01 import models# Register your models here.admin.site.register(models.UserInfo)然后执行:python manage.py createsuperuser 然后就可以进行访问了转载于:https://ww...

2019-08-21 11:14:00 67

转载 html中如何用其他样式覆盖传输文件标签

<form action="/upload.html/" method="post" novalidate enctype="multipart/form-data">{# 上传文件时需要添加enctype="multipart/form-data"#} {% csrf_token %} <input type="text" name="user"&g...

2019-08-20 15:16:00 141

转载 django中form的数据库验证操作

viewfrom django.core.exceptions import NON_FIELD_ERRORS, ValidationErrorclass AjaxForm(forms.Form): username=fields.CharField()#静态字段,当程序运行起来时就执行了,并且执行后就不变化了,数据源更新但是不会在数据源取数据 user_id=field...

2019-08-16 10:51:00 146

转载 Form中正则的扩展

https://www.cnblogs.com/wupeiqi/articles/6144178.html1. Form组件扩展: 1.简单扩展 利用Form组件自带的正则扩展: a. 方式一 from django.forms import Form from django.forms...

2019-08-13 20:36:00 93

转载 ajax结合form进行页面跳转

html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><form action="/ajax/" id="fm" metho...

2019-08-13 17:23:00 166

转载 常用form及当在数据库添加后及时更新

form中fields包含正则表达式和html中的插件(会访问__str__方法返回一个html文件),插件可以通过wieget这个参数进行修改为字符串的选择框xdb=fields.CharField( widget=widgets.Select(choices=[(1,'上海',),(2,'北京'),(3,'沙河')]))Form重点: - 字段 用于...

2019-08-13 11:08:00 142

转载 初识form

htmlf1<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><form id="fm" action="/f1.html/" m...

2019-08-06 19:22:00 100

转载 django分页扩展之显示上下页和标签每页的跳转

viewsclass CustomPaginator(Paginator): def __init__(self,current_page, per_pager_num,*args,**kwargs): # 当前页 self.current_page = int(current_page) # 最多显示的页码数量 11 s...

2019-08-05 16:20:00 331

转载 自定制分页

pager.py#_author:wenghao#date:2019/8/5class Pagination(object): def __init__(self,totalCount,currentPage,perPageItemNum=20,maxPageNum=7): # 总页数 self.total_count=totalCount ...

2019-08-05 16:12:00 72

转载 ajax

模态对话框进行提交做验证时,不适合用form表单提交,要用ajax方式进行提交。因为做验证时不应该是报错信息<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <link rel...

2019-07-30 14:56:00 97

转载 用类的方式进行cbv(Class-Based-View)模式 这里也是django框架的扩展点之一

urls  url(r'^cbv$', views.CBV.as_view()),#类的处理方式,在django中后面的要加viewsfrom django.views import Viewclass CBV(View): # 这个方法的作用在于可以把get和post方法相同的地方写在dispatch中 def dispatch(self, reque...

2019-07-24 14:36:00 88

转载 cookie和session

cokkie是保存在用户这边的信息,session是保存在客户端的信息,cokkie这边信息和session信息可以进行验证操作,这是cokkie和session操作之一,服务器端可以在往你电脑写cokkie带给你1、Cookie操作 -客户端本地存储的键值对转载于:https://www.cnblogs.com/wenghao/p/11237013.html...

2019-07-24 11:40:00 59

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除