随笔分类 - Django框架
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><h2>模板语法</h2><h3>变量渲染之深度查询</h3><p>姓名: {{ name }}</p><p>四
阅读全文
摘要:"""mysite URL ConfigurationThe `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/
阅读全文
摘要:from django.shortcuts import render,redirect# Create your views here.from django.shortcuts import HttpResponsedef login(request): if request.method ==
阅读全文
摘要:from django.shortcuts import render# Create your views here.from django.shortcuts import HttpResponsedef login(request): if request.method == "GET": #
阅读全文
摘要:"""mysite URL ConfigurationThe `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> .now{ color: red; } h3{ text-align: center; } </style></head
阅读全文
摘要:"""mysite URL ConfigurationThe `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/
阅读全文
摘要:"""mysite URL ConfigurationThe `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/
阅读全文
摘要:1.下载pip命令 2.安装Django 3.创建Django项目 4.启动Django mysite项目 4.创建Django mysite项目子应用 python manage.py startapp 子应用名称
阅读全文
摘要:前言 之前我们介绍过web应用程序和http协议,简单了解过web开发的概念。Web应用程序的本质 接收并解析HTTP请求,获取具体的请求信息 处理本次HTTP请求,即完成本次请求的业务逻辑处理 构造并返回处理结果——HTTP响应 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1
阅读全文