摘要: 以上。 阅读全文
posted @ 2015-03-16 23:46 valentine is me 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 安装下载查看git版本:git --version配置自动补全mac 和 linux需要配置,windows自带配置用户名密码,用于显示提交作者是谁'''配置用户名及邮箱'''git config --global user.name valentinegit config --global use... 阅读全文
posted @ 2015-03-03 13:15 valentine is me 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 自定义错误页面views.py@app.errorhandler(404)def internal_error(error): return render_template('error.html',errorcode = 404, errormsg = 'page not found')@a... 阅读全文
posted @ 2015-02-25 14:59 valentine is me 阅读(313) 评论(0) 推荐(0) 编辑
摘要: cookiefrom flask import Flask, render_template, request, redirect, make_responseapp = Flask(__name__)user_list = ['wb', 'valentine', 'wb112232']@app.r... 阅读全文
posted @ 2015-02-12 14:32 valentine is me 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 表单通过request取得from flask import Flask, render_template, requestapp = Flask(__name__) @app.route('/regist/', methods=['GET','POST'])def regist(): if req... 阅读全文
posted @ 2015-02-12 09:45 valentine is me 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 线性方程组 linear equations形如a1x1+a2x2+a3x3+....+anxn=b的方程是线性方程,其中a1到an通常是已知数。线性方程组是由一个或几个包含相同变量的x1..x2..xn的线性方程组成的。线性方程组的一组解是一组数(s1..s2..sn),解得集合称之为解集。具有相... 阅读全文
posted @ 2015-02-09 11:46 valentine is me 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 模版变量from flask import Flask, render_templateapp = Flask(__name__)@app.route('/')def index(): user='valentine' return render_template('index.html',user... 阅读全文
posted @ 2015-02-08 14:22 valentine is me 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 安装sudo pip install flask会同时安装flask\jinja2\wsdl,此时我在apache下创建工作目录:cd /Applications/XAMPP/xamppfiles/htcdosmkdir learnFlask测试flask是否安装成功,进入python环境:impo... 阅读全文
posted @ 2015-02-07 22:47 valentine is me 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 反复遇到很多问题,最后解决,一步一步来:1.下载到Python27/Scripts中2.管理员身份运行cmd>python C:\Python27\Scripts\ez_setup.py3.添加环境变量,将C:\Python27\Scripts添加至path环境变量4.关掉cmd窗口..再打开..这... 阅读全文
posted @ 2015-02-06 15:28 valentine is me 阅读(272) 评论(0) 推荐(0) 编辑
摘要: Mac基础打开Terminal,使用cd切换路径,因为安装了xampp环境,以此为例cd /Applications/XAMPP/xamppfiles/htdocs/python进入路径后,查看这个文件夹下有什么文件:ls -l运行这个.py文件:python text.py -s xxx顺便吐槽一... 阅读全文
posted @ 2015-01-28 23:31 valentine is me 阅读(563) 评论(0) 推荐(0) 编辑