上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
  2019年7月2日
摘要: 程序目录 models.py from django.db import models# Create your models here.class UserInfo(models.Model): user=models.CharField(max_length=32) urls.py """s14 阅读全文
posted @ 2019-07-02 23:32 SZ_文彬 阅读(466) 评论(0) 推荐(0)
摘要: views request.body request.POST(request.body) request.FILES(request.body) request.GET request.XXX.getlist request.Meta(...) request.method(POST,GET,PU 阅读全文
posted @ 2019-07-02 23:30 SZ_文彬 阅读(184) 评论(0) 推荐(0)
  2019年6月27日
摘要: 程序目录 urls.py """s14_day21 URL Configuration"""from django.contrib import adminfrom django.conf.urls import url,includefrom app01 import viewsurlpatter 阅读全文
posted @ 2019-06-27 19:58 SZ_文彬 阅读(259) 评论(0) 推荐(0)
摘要: 默认值:url(r'index/', views.index,{'name':"root"})def index(request,name): print(name) return HttpResponse('ok')命名空间:/a/ include('app01.urls',namespace=' 阅读全文
posted @ 2019-06-27 19:54 SZ_文彬 阅读(194) 评论(0) 推荐(0)
  2019年6月15日
摘要: 程序目录 Models.py from django.db import models# Create your models here.class Business(models.Model): #默认id列 caption=models.CharField(max_length=32) code 阅读全文
posted @ 2019-06-15 21:09 SZ_文彬 阅读(553) 评论(0) 推荐(0)
摘要: 数据库设置字符编码CREATE DATABASE `test2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;修改表的编码alter table app01_host charset='utf8';授权grant all privileges 阅读全文
posted @ 2019-06-15 20:59 SZ_文彬 阅读(151) 评论(0) 推荐(0)
  2019年6月11日
摘要: 一:路由系统 url 1.url(r'^index/', views.index),url(r'^home/',views.Home.as_view()), 一个url对应一个函数或一个类 2.url(r'^detail-(\d+).html',views.detail), 一类url对应一个函数或 阅读全文
posted @ 2019-06-11 20:47 SZ_文彬 阅读(263) 评论(0) 推荐(0)
  2019年6月9日
摘要: 程序目录 Project-->urls.pyfrom django.contrib import adminfrom django.conf.urls import url,includeurlpatterns = [ url(r'^admin/', admin.site.urls), url(r' 阅读全文
posted @ 2019-06-09 23:09 SZ_文彬 阅读(1130) 评论(0) 推荐(0)
摘要: App01 >urls.py from django.contrib import adminfrom django.conf.urls import urlfrom app01 import viewsurlpatterns = [ url(r'^login/', views.login), ur 阅读全文
posted @ 2019-06-09 15:31 SZ_文彬 阅读(385) 评论(0) 推荐(0)
  2019年6月8日
摘要: S14day19 >urls.py from django.contrib import adminfrom django.conf.urls import url,includeurlpatterns = [ url(r'^cmdb/',include('app01.urls')), url(r' 阅读全文
posted @ 2019-06-08 23:19 SZ_文彬 阅读(248) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页