- 博客(36)
- 收藏
- 关注
转载 期末作品检查
个人学期总结总结Python+Flask+MysqL的web建设技术过程,标准如下:即是对自己所学知识的梳理也可作为初学入门者的简单教程也可作为自己以后复习的向导也是一种向外展示能力的途径在一学期里我们学习并实现了基于Python的Flask框架web建设项目,前言及前期准备:在学习这门课的时候运用到了python,flask,mysql,render...
2018-01-05 10:56:00
169
转载 管理信息系统 第三部分 作业
1.DDS和IDDS的组成。DDS:决策支持系统基本结构主要由四个部分组成,即数据部分、模型部分、推理部分和人机交互部分:数据部分是一个数据库系统;模型部分包括模型库(MB)及其管理系统(MBMS);推理部分由知识库(KB)、知识库管理系统(KBMS)和推理机组成;人机交互部分是决策支持系统的人机交互界面,用以接收和检验用户请求,调用系统内部功能软件为决策服务...
2017-12-29 09:03:00
257
转载 模型分离(选做)
模型分离--让代码更方便管理新建models.py,将模型定义全部放到这个独立的文件中。from werkzeug.security import generate_password_hash,check_password_hashfrom datetime import datetimefrom exts import dbclass User(db.Mod...
2017-12-29 08:42:00
125
转载 密码保护
1.更新User对象,设置对内的_passwordclass User(db.Model): __tablename__ = 'user' _password = db.Column(db.String(200), nullable=False) #内部使用class User(db.Model): __tablename__='user...
2017-12-22 11:47:00
160
转载 实现搜索功能
1.准备视图函数search()@app.route('/search/')def search(): 2.修改base.html 中搜索输入框所在的<form action="{{ url_for('search') }}" method="get"><input name="q" type="text" placeholder="...
2017-12-19 10:00:00
163
转载 完成个人中心—导航标签
1.个人中心—视图函数带标签页面参数tag@app.route('/usercenter/<user_id>/<tag>')def usercenter(user_id, tag): if tag == ‘1': return render_template('usercenter1.html', **context)@app.rou...
2017-12-15 09:57:00
126
转载 个人中心标签页导航
{% extends "base.html"%}{% block title%}个人中心{% endblock%}{% block head%} <style> .nav_ul li{ float:left; list-style:none; margin:20px; ...
2017-12-14 20:59:00
93
转载 评论列表显示及排序,个人中心显示
显示所有评论{% for foo in ques.comments %}<ul class="list-group"style="margin:10px"> {%for foo in ques.comments%} <li class="list-group-item"> <span cl...
2017-12-13 15:55:00
126
转载 首页列表显示全部问答,完成问答详情页布局。
@app.route('/')def index(): context={ 'questions': Question.query.order_by('-creat_time').all() } return render_template('base.html',**context) {% block mai...
2017-12-02 18:22:00
150
转载 制作首页的显示列表。
{% extends 'base.html' %} {% block title %}首页{% endblock %} <meta charset="UTF-8"> {% block main %} <img src="{{ url_for('static',filename='images/86x97sZ11K4.jpg')...
2017-11-29 16:02:00
88
转载 发布功能完成。
编写要求登录的装饰器def loginFrist(func): @wraps(func) def wrapper(*args, **kwargs): if session.get('user'): return func(*args, **kwargs) else: ...
2017-11-28 10:05:00
102
转载 登录之后更新导航
from flask import Flask, render_template, request, redirect, url_for, sessionfrom flask_sqlalchemy import SQLAlchemyimport configapp = Flask(__name__)app.config.from_object(config)d...
2017-11-24 09:56:00
116
转载 完成登录功能,用session记住用户名
from flask import Flask, render_template,request,redirect,url_for,sessionfrom flask_sqlalchemy import SQLAlchemyimport configfrom functools import wrapsfrom datetime import datetime...
2017-11-21 10:01:00
163
转载 完成注册功能
function fnEnroll() { var zcoUname = document.getElementById("zcuname") var zcoError = document.getElementById("zcerror_box") var zcoUword1 = document.getElementById("zcuword1")...
2017-11-17 09:55:00
106
转载 连接mysql数据库,创建用户模型
from flask import Flaskfrom flask_sqlalchemy import SQLAlchemyimport configapp=Flask(__name__)app.config.from_object(config)db=SQLAlchemy(app)db.create_all()class User(db.Mod...
2017-11-14 20:42:00
107
转载 管理信息系统的开发与管理
from flask import Flask,render_templateapp = Flask(__name__)@app.route('/')def daohang(): return render_template('daohang.html')@app.route('/login/')def login(): retur...
2017-11-08 20:29:00
88
转载 开始Flask项目
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title> {% block title %}{% endblock %} 首页</title> <link...
2017-11-03 16:00:00
113
转载 夜间模式的开启与关闭,父模板的制作
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>夜间模式</title> <script> function mySwitch(){ ...
2017-11-02 21:52:00
101
转载 完成登录与注册页面的前端
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>登录</title> <link rel="stylesheet" href="../static/css/denglu1.1.css...
2017-10-31 21:10:00
105
转载 JavaScript 基础,登录验证
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>jsDemo</title></head><body> <p id="demo">ppp<...
2017-10-26 13:18:00
149
转载 CSS实例:图片导航块
1.<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" type="text/css" href="../static/css/si.c...
2017-10-20 10:06:00
169
转载 导航,头部,CSS基础
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <base href="http://p1.so.qhimgs1.com/t0148db23e6d9b288a...
2017-10-18 21:34:00
76
转载 web基础,用html元素制作web页面
<!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/html"><head> <meta charset="UTF-8"> <title>WIS问答平台</title></head><body> <!--...
2017-10-17 09:53:00
91
转载 web
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>WIS问答平台</title></head><body> <h1 align="center">WIS问答平台</h1&g...
2017-10-13 10:00:00
139
转载 中文词频统计
中文词频统计import jiebatxt = open('test.txt','r',encoding='utf-8').read()words= list(jieba.cut(txt))dic={}for w in words: if len(w)==1: continue else: d...
2017-09-29 19:46:00
94
转载 文件方式实现完整的英文词频统计实例.
fo=open('test.txt','w')>>> fo.write('''Hong Kong action star Jackie Chan's latest film premiered in Beijing on Sunday at an event.The film, The Foreigner, follows Quan's (played by Cha...
2017-09-26 10:55:00
115
转载 文件方式实现完整的英文词频统计实例
fo=open('test.txt','w')>>> fo.write('''Hong Kong action star Jackie Chan's latest film premiered in Beijing on Sunday at an event.The film, The Foreigner, follows Quan's (played by Cha...
2017-09-26 10:53:00
124
转载 123
1.news='''Hong Kong action star Jackie Chan's latest film premiered in Beijing on Sunday at an event.The film, The Foreigner, follows Quan's (played by Chan) journey to seek revenge after his...
2017-09-26 09:51:00
77
转载 组合数据类型练习,英文词频统计实例上
1.字典实例:建立学生学号成绩字典,做增删改查遍历操作。a={'01':'80','02':'70','03':'100','04':'90'}>>> a.get('04')'90'>>> a{'01': '80', '02': '70', '03': '100', '04': '90'}>>> a['05']=99>...
2017-09-22 16:50:00
92
转载 英文词频统计预备,组合数据类型练习
1.read='''Zhuang Zhou's family was poor. Once, he went to the official who supervised1 rivers to borrow some grain. The official said: "Well, wait until the end of the year when I collect the t...
2017-09-20 21:09:00
84
转载 凯撒密码、GDP格式化输出、99乘法表
1.plaincode=input('明文:')print('密文:',end='')for i in plaincode: print(chr(ord(i)+3),end='')2.print('国家名称GDP总量(人民币亿元)')print('{0:''<12}¥{1:''>10,.2f}'.format('中国',765873.4375))p...
2017-09-19 11:43:00
119
转载 条件循环函数练习
1.五角星import turtleturtle.setup(600,400,0,0)turtle.color('yellow')turtle.bgcolor('red')turtle.fillcolor('yellow')turtle.up()turtle.goto(-250,75)turtle.down()turtle.begin_fill()fo...
2017-09-12 11:16:00
108
转载 条件循环
import turtlefor i in range(5): turtle.up() turtle.goto(0,-20*(i+1)) turtle.down() turtle.circle(20*(i+1)) turtle.write(10-i) from turtle import *color('red','yellow')beg...
2017-09-12 10:07:00
107
转载 turtle库练习
1、画一组同切圆>>> import turtle>>> turtle.circle(50)>>> turtle.circle(80)>>> turtle.circle(100)>>> turtle.circle(60)>>> turtle.circle(70)>...
2017-09-08 21:56:00
165
转载 python练习
1.>>> name=input("please input your name")aa>>> print('hi,%s.'%name)hi,aa.>>>2.>>> a=input('input:')input:1>>> b=input("input:")input:2>>&...
2017-09-06 20:28:00
69
转载 理解信息管理系统
1.信息与数据的区别是什么? 数据是记录客观事物,可鉴别的符号,而信息是具有关联性和目的性的结构化,组织化的数据。数据经过处理仍是数据,而信息经过加工可以形成知识。处理数据是为了便于更好的解释,只有经过解释,数据才有意义,才可以成为信息。可以说信息是经过加工以后,对客观世界产生影响的数据。2.信息与知识的区别是什么?信息是具有关联性和目的性的结构化,组织化的数据,知识是对信息的进...
2017-09-05 21:51:00
264
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人