摘要: inux下因为默认带python了,如果要升级版本的,要先把系统自带的python改名或者卸载掉,再安装你要的python版本,centos下由于yum依赖自带的python2.6,所有不能卸载。 python指向的是python2 ,python2指向的是python2.7,那也就是在控制台输入p 阅读全文
posted @ 2020-04-14 11:53 灰色轨迹8554 阅读(289) 评论(0) 推荐(0)
摘要: 版本 git-2.21.0 目录 cd /usr 下载链接 wget https://github.com/git/git/archive/v2.21.0.tar.gz tar -zvxf v2.21.0.tar.gz 执行依赖包 yum -y install curl-devel expat-de 阅读全文
posted @ 2020-03-18 17:05 灰色轨迹8554 阅读(172) 评论(0) 推荐(0)
摘要: from flask import Flask,request,render_template,make_response,redirectfrom flask_sqlalchemy import SQLAlchemyimport pymysql#pymysql视为mysqlDBpymysql.in 阅读全文
posted @ 2019-12-10 23:38 灰色轨迹8554 阅读(298) 评论(0) 推荐(0)
摘要: 3.定义模型 1.数据库 和 框架的配置 1.安装 SQLAlchemy pip3 install sqlalchemy pip3 install flask-sqlalchemy 2.创建数据库 create database flask default charset utf8 collate 阅读全文
posted @ 2019-12-10 21:05 灰色轨迹8554 阅读(165) 评论(0) 推荐(0)
摘要: def fn(): # global num num = 10 print(num) def func(): # num = 10 print(num) return funcfunc=fn()func()def father(money): def son(someone): print('和%s 阅读全文
posted @ 2019-11-20 23:08 灰色轨迹8554 阅读(118) 评论(0) 推荐(0)
摘要: 数字类型 '''1. 整型a1 = 10a2 = int(20) 2. 长整型(py2特有,py3废弃)b1 = 12345678901234567890b2 = long(100) 3. 浮点型c1 = 3.14c2 = float(5.12) 4. 复数类型d = 2 + 3j''' '''总结 阅读全文
posted @ 2019-10-25 09:51 灰色轨迹8554 阅读(219) 评论(0) 推荐(0)
摘要: 国际化setting配置 LANGUAGE_CODE = 'zh-hans'TIME_ZONE = 'Asia/Shanghai'USE_I18N = TrueUSE_L10N = TrueUSE_TZ = Falsesetting中间件 MIDDLEWARE = [ 'django.middlew 阅读全文
posted @ 2019-10-23 23:56 灰色轨迹8554 阅读(133) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/bainianminguo/p/10674396.html 阅读全文
posted @ 2019-10-23 16:53 灰色轨迹8554 阅读(119) 评论(0) 推荐(0)
摘要: from testcase1 import countimport unittestclass MyTest(unittest.TestCase): def setUp(self): print('test start') def tearDown(self): print('test end')c 阅读全文
posted @ 2019-10-23 09:04 灰色轨迹8554 阅读(163) 评论(0) 推荐(0)