会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Guohad
博客园
首页
新随笔
联系
订阅
管理
2020年7月29日
Flask基础
摘要: Flask简单使用 1、定义路由 @app.route('/')是装饰器,定义如下: app.route(rule, options) rule参数:是绑定URL与函数。 options参数:是可选参数。 2、run() 函数来让应用运行在本地服务器上。定义如下 : app.run(host, po
阅读全文
posted @ 2020-07-29 19:41 Guohd
阅读(101)
评论(0)
推荐(0)
2020年7月6日
算法面试题整理
摘要: 1、python反转字符串 '''第一种:使用字符串切片''' s = 'Hello World' print(s[::-1]) # dlroW olleH '''第二种:使用列表的reverse方法''' l = list(s) l.reverse() print( "".join(l) ) #
阅读全文
posted @ 2020-07-06 10:18 Guohd
阅读(162)
评论(0)
推荐(0)
python基础数据类型整理
摘要: 1.1 列表和元组 1、列表基本操作 1. 列表赋值 a = [1,2,3,4,5,6,7,8] a[0] = 100 #the result : [100, 2, 3, 4, 5, 6, 7, 8] 2. 元素删除 a = [1,2,3,4,5,6,7,8] del a[0] #the resul
阅读全文
posted @ 2020-07-06 09:47 Guohd
阅读(173)
评论(0)
推荐(0)
2019年12月23日
Cookies 和 Session
摘要: cookies,session作用:用户状态保持,告诉服务器你是谁。 migrate指令和makemigrations的差别:makemigrations生成迁移文件,migrate执行迁移文件 cookies:把认为重要的信息放在cookies中在每次交流时都带上1.设置cookie:.获取值.设
阅读全文
posted @ 2019-12-23 10:06 Guohd
阅读(291)
评论(0)
推荐(0)
2019年12月19日
Django 第一天
摘要: 配置urls导包 from django.urls import path from . import views urlpatterns=[ path('xxx/',views.xxx) ] 配置views导包 from django.shortcuts import render from dj
阅读全文
posted @ 2019-12-19 20:41 Guohd
阅读(138)
评论(1)
推荐(0)
公告