上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
  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_文彬 阅读(507) 评论(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_文彬 阅读(111) 评论(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_文彬 阅读(222) 评论(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_文彬 阅读(1074) 评论(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_文彬 阅读(340) 评论(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_文彬 阅读(210) 评论(0) 推荐(0) 编辑
  2019年6月5日
摘要: Urls.py from django.contrib import adminfrom django.conf.urls import urlfrom cmdb import viewsurlpatterns = [ url(r'^admin/', admin.site.urls), # path 阅读全文
posted @ 2019-06-05 17:48 SZ_文彬 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 安装 pip install django环境变量: C:\Program Files\Anaconda3\Scriptsdjango-admin startproject mysite 创建django工程mysite目录 -mysite #对整个程序进行配置 - __init__ -settin 阅读全文
posted @ 2019-06-05 17:47 SZ_文彬 阅读(183) 评论(0) 推荐(0) 编辑
  2019年6月2日
摘要: 安装 pip install django环境变量: C:\Program Files\Anaconda3\Scriptsdjango-admin startproject mysite 创建django工程mysite目录 -mysite - __init__ -settings -urls -w 阅读全文
posted @ 2019-06-02 23:35 SZ_文彬 阅读(145) 评论(0) 推荐(0) 编辑
摘要: s5.py from wsgiref.simple_server import make_server def handle_index(): return [b'<h1>Hello,Index!</h1>'] def handle_date(): return [b'<h1>Hello,Date! 阅读全文
posted @ 2019-06-02 23:33 SZ_文彬 阅读(208) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页