摘要: code <script type="text/javascript"> // 获取的是一个 如果要获取多个 // document.querySelectorAll(selector) document.querySelector("#btnJson").onclick = function () 阅读全文
posted @ 2020-12-23 23:58 anobscureretreat 阅读(164) 评论(0) 推荐(0)
摘要: code <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <h1>Ajax 发送 get 请求</h1> <input type="button 阅读全文
posted @ 2020-12-23 23:55 anobscureretreat 阅读(120) 评论(0) 推荐(0)
摘要: get请求 $.ajax({ url:'test.php?type=1&id='+id, //url带参数 type:'GET', //请求方式 cache:false, //缓存 success: function(data){ //请求成功后返回数据data $('body').html(dat 阅读全文
posted @ 2020-12-23 23:54 anobscureretreat 阅读(130) 评论(0) 推荐(0)
摘要: code1 function (data) { data = data || {} $.ajax({ type: "POST", url: data.url, contentType: "application/json; charset=utf-8", data: JSON.stringify(d 阅读全文
posted @ 2020-12-23 23:52 anobscureretreat 阅读(352) 评论(0) 推荐(0)
摘要: code <!DOCTYPE HTML> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>Bootstrap 3 的多级下拉菜单示例</title> <script type="text/javascript" src="http:/ 阅读全文
posted @ 2020-12-23 23:51 anobscureretreat 阅读(1540) 评论(0) 推荐(0)
摘要: code <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <iframe id="iframe" src="{{ book_url }}" frame 阅读全文
posted @ 2020-12-23 23:49 anobscureretreat 阅读(117) 评论(0) 推荐(0)
摘要: code <!DOCTYPE html> <head> <meta charset="UTF-8"> <title>clipboard示例</title> <script src="clipboard.min.js"></script> </head> <body> <hr> <h2>从另外一个元素 阅读全文
posted @ 2020-12-23 23:47 anobscureretreat 阅读(381) 评论(0) 推荐(0)
摘要: 想给form表单增加回车自动提交的功能 $('#password').keydown(function(event){ if (event.keyCode == 13) $('#login').click(); }); 然而,并没有达到预期的效果,而是自动刷新了表单,并将表单参数放在了url后面,如 阅读全文
posted @ 2020-12-23 23:45 anobscureretreat 阅读(121) 评论(0) 推荐(0)
摘要: 在使用imgbox.js是出现的jquery版本不兼容问题,之后了解到jQuery.noConflict()的用法 jQuery.noConflict()的存在只有一个目的:它允许你在同一个页面加载多个jQuery实例,尤其是不同版本的jQuery。 code <link rel="styleshe 阅读全文
posted @ 2020-12-23 23:42 anobscureretreat 阅读(464) 评论(0) 推荐(0)
摘要: code <head> <title>JavaScript RSA Encryption</title> <meta charset="UTF-8"> <script src="{{ url_for('static',filename='js/jquery-1.8.3.min.js') }}"></ 阅读全文
posted @ 2020-12-23 23:41 anobscureretreat 阅读(380) 评论(0) 推荐(0)
摘要: code from flask import Flask,jsonify,render_template,make_response from flask_restful import Api, Resource,request from flask_restful import reqparse 阅读全文
posted @ 2020-12-23 23:38 anobscureretreat 阅读(2029) 评论(0) 推荐(0)
摘要: code $.ajax({ type: "POST", url: "/encrype", contentType: "application/json", data: JSON.stringify(json), /*传给后端的数据格式json*/ dataType: "json", /*后端返回的数 阅读全文
posted @ 2020-12-23 23:36 anobscureretreat 阅读(1011) 评论(0) 推荐(0)
摘要: 今天发现一个警告 Mixed Content: The page was loaded over HTTPS,blocked the content must be served over HTTPS.,。。 百度了一下含义是因为 是浏览器不允许在https页面里嵌入http的请求,现在高版本的浏览 阅读全文
posted @ 2020-12-23 23:34 anobscureretreat 阅读(628) 评论(0) 推荐(0)
摘要: JavaScript <script type="text/javascript"> $(function(){ function footerPosition(){ $("footer").removeClass("fixed-bottom"); //网页正文全文高度 var contentHei 阅读全文
posted @ 2020-12-23 23:32 anobscureretreat 阅读(169) 评论(0) 推荐(0)
摘要: MQTT协议是广泛应用的物联网协议,使用测试MQTT协议需要MQTT的代理。有两种方法使用MQTT服务, 一是租用现成的MQTT服务器,如阿里云,百度云,华为云等公用的云平台提供的MQTT服务, 使用公用的MQTT服务器的好处是省事,但如果仅仅用于测试学习还需要注册帐号,灵活性差些, 有的平台还需要 阅读全文
posted @ 2020-12-23 23:15 anobscureretreat 阅读(2311) 评论(0) 推荐(0)
摘要: 使用储存库安装 EMQ X 安装所需要的依赖包 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 使用以下命令设置稳定存储库,以 CentOS7 为例 sudo yum-config-manager --add-repo 阅读全文
posted @ 2020-12-23 23:09 anobscureretreat 阅读(1060) 评论(0) 推荐(0)
摘要: code # -*- coding:utf-8 -*- from flask import Flask from flask import request import hashlib import time import re import xml.etree.ElementTree as ET 阅读全文
posted @ 2020-12-23 22:54 anobscureretreat 阅读(535) 评论(0) 推荐(0)
摘要: 图片 test.py from flask import Flask,render_template,make_response from flask_restful import Api, Resource, reqparse import werkzeug app = Flask(__name_ 阅读全文
posted @ 2020-12-23 22:50 anobscureretreat 阅读(155) 评论(0) 推荐(0)
摘要: code import multiprocessing import time def foo(): print ('Starting function') time.sleep(0.1) print ('Finished function') if __name__ == '__main__': 阅读全文
posted @ 2020-12-23 22:44 anobscureretreat 阅读(168) 评论(0) 推荐(0)
摘要: server import socket import datetime s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.bind(('127.0.0.1',9999)) s.listen(1) starttime = None endtim 阅读全文
posted @ 2020-12-23 22:41 anobscureretreat 阅读(1189) 评论(0) 推荐(0)
摘要: code import threading import time exitFlag = 0 class myThread (threading.Thread): def __init__(self, threadID, name, counter): threading.Thread.__init 阅读全文
posted @ 2020-12-23 22:38 anobscureretreat 阅读(88) 评论(0) 推荐(0)
摘要: code.py import os import sys import time program = "python3" print("Process calling") arguments = ["xxxxxx.py"] os.execvp(program, (program,) + tuple( 阅读全文
posted @ 2020-12-23 22:37 anobscureretreat 阅读(165) 评论(0) 推荐(0)
摘要: code import multiprocessing import time def foo(): print ('Starting function') time.sleep(0.1) print ('Finished function') if __name__ == '__main__': 阅读全文
posted @ 2020-12-23 22:32 anobscureretreat 阅读(179) 评论(0) 推荐(0)
摘要: windows和linux路径斜杠不兼容问题 windows >>> import os >>> os.getcwd() 'C:\\Program Files (x86)\\python27' >>> os.path.join(os.getcwd(),"hello") 'C:\\Program Fi 阅读全文
posted @ 2020-12-23 22:30 anobscureretreat 阅读(579) 评论(0) 推荐(0)
摘要: code >>> >>> import datetime >>> i = datetime.datetime.now() >>> t="{}{}{}{}{}{}-{}".format(i.year,i.month,i.day,i.hour,i.minute,i.second,i.microsecon 阅读全文
posted @ 2020-12-23 22:28 anobscureretreat 阅读(1373) 评论(0) 推荐(0)
摘要: code f = open('a.txt', 'r') n = open('b.txt','w+') n.writelines(f.readlines()) n.close() f.close() code f = open("a.txt", 'w') f.write("写入一行新数据") f.fl 阅读全文
posted @ 2020-12-23 22:22 anobscureretreat 阅读(386) 评论(0) 推荐(0)
摘要: code # 文件上传 import flask, os, sys,time from flask import request interface_path = os.path.dirname(__file__) sys.path.insert(0, interface_path) #将当前文件的 阅读全文
posted @ 2020-12-23 22:20 anobscureretreat 阅读(1043) 评论(0) 推荐(0)
摘要: code >>> import sys >>> sys.version_info sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0) >>> 阅读全文
posted @ 2020-12-23 22:18 anobscureretreat 阅读(338) 评论(0) 推荐(0)
摘要: code pip3 install mitmproxy 阅读全文
posted @ 2020-12-23 22:16 anobscureretreat 阅读(88) 评论(0) 推荐(0)
摘要: os.remove() 方法用于删除指定路径的文件。如果指定的路径是一个目录,将抛出OSError。 code #!/usr/bin/python3 import os, sys # 列出目录 print ("目录为: %s" %os.listdir(os.getcwd())) # 移除 os.re 阅读全文
posted @ 2020-12-23 22:15 anobscureretreat 阅读(242) 评论(0) 推荐(0)
摘要: os.rename() 方法用于命名文件或目录,从 src 到 dst,如果dst是一个存在的目录, 将抛出OSError。 code #!/usr/bin/python3 import os, sys # 列出目录 print ("目录为: %s"%os.listdir(os.getcwd())) 阅读全文
posted @ 2020-12-23 22:13 anobscureretreat 阅读(219) 评论(0) 推荐(0)
摘要: Code import unittest class SimplisticTest(unittest.TestCase): def test(self): a = 'a' b = 'a' self.assertEqual(a, b) Output macname@MacdeMacBook-Pro c 阅读全文
posted @ 2020-12-23 22:10 anobscureretreat 阅读(124) 评论(0) 推荐(0)
摘要: client.py from socket import * import os def main(): # 建立套接字 tcp_socket = socket(AF_INET, SOCK_STREAM) # 接收用输入的服务器端的ip和端口 tcp_ip = input("请输入ip:") tcp 阅读全文
posted @ 2020-12-23 22:06 anobscureretreat 阅读(304) 评论(0) 推荐(0)
摘要: code #coding=utf-8 import os import random import time def test(book_type,book_id): #获取指定长度的随机数字 #支持16进制数的最大的长度为9 random_str_length=random.randint(3,6 阅读全文
posted @ 2020-12-23 22:01 anobscureretreat 阅读(142) 评论(0) 推荐(0)
摘要: code Traceback (most recent call last): File "test.py", line 190, in <module> cursor.execute(sql) sqlite3.OperationalError: near "s": syntax error cod 阅读全文
posted @ 2020-12-23 21:57 anobscureretreat 阅读(1317) 评论(0) 推荐(0)
摘要: code import sys,os sys.path.append("/".join(os.path.dirname(os.path.abspath(__file__)).split("/")[:-1])+'/lib') from selenium import webdriver import 阅读全文
posted @ 2020-12-23 21:55 anobscureretreat 阅读(99) 评论(0) 推荐(0)
摘要: code import sys,os sys.path.append("/".join(os.path.dirname(os.path.abspath(__file__)).split("/")[:-1])+'/lib') from selenium import webdriver import 阅读全文
posted @ 2020-12-23 21:51 anobscureretreat 阅读(115) 评论(0) 推荐(0)
摘要: code import sys,os sys.path.append("/".join(os.path.dirname(os.path.abspath(__file__)).split("/")[:-1])+'/lib') from selenium import webdriver import 阅读全文
posted @ 2020-12-23 21:50 anobscureretreat 阅读(82) 评论(0) 推荐(0)
摘要: code #!/usr/bin/python3 import smtplib from email.mime.text import MIMEText from email.header import Header from email.mime.multipart import MIMEMulti 阅读全文
posted @ 2020-12-23 21:47 anobscureretreat 阅读(489) 评论(0) 推荐(0)
摘要: code #!/usr/bin/python3 import smtplib from email.mime.text import MIMEText from email.header import Header # 第三方 SMTP 服务 mail_host="smtp.mxhichina.co 阅读全文
posted @ 2020-12-23 21:41 anobscureretreat 阅读(177) 评论(0) 推荐(0)
摘要: 问题描述: 在阿里云的自带centos上运行python manage.py runserver的时候报错: django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17). 阅读全文
posted @ 2020-12-23 21:38 anobscureretreat 阅读(94) 评论(0) 推荐(0)
摘要: code from selenium.webdriver.common.action_chains import ActionChains from selenium import webdriver driver = webdriver.Chrome() asleep(driver) driver 阅读全文
posted @ 2020-12-23 21:36 anobscureretreat 阅读(136) 评论(0) 推荐(0)
摘要: code from selenium.webdriver.common.action_chains import ActionChains from selenium import webdriver driver = webdriver.Chrome() asleep(driver) driver 阅读全文
posted @ 2020-12-23 21:35 anobscureretreat 阅读(1146) 评论(0) 推荐(0)
摘要: code import sys,os sys.path.append("/".join(os.path.dirname(os.path.abspath(__file__)).split("/")[:-1])+'/lib') from selenium import webdriver import 阅读全文
posted @ 2020-12-23 21:17 anobscureretreat 阅读(336) 评论(0) 推荐(0)
摘要: code pip3 install lxml 阅读全文
posted @ 2020-12-23 21:14 anobscureretreat 阅读(136) 评论(0) 推荐(0)
摘要: code #安装pipenv pip3 install pipenv #安装虚拟环境 pipenv install #进入虚拟环境 pipenv shell #查看当前环境依赖 pip3 list #安装包 pipenv install flask #卸载包 pipenv uninstall fla 阅读全文
posted @ 2020-12-23 21:12 anobscureretreat 阅读(227) 评论(0) 推荐(0)
摘要: code python -V pip -V 阅读全文
posted @ 2020-12-23 21:11 anobscureretreat 阅读(266) 评论(0) 推荐(0)
摘要: python socket 实现点对点聊天,包括文字,语音,无声视频 client #!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : newclient.py @Time : 2020/01/13 14:17:16 @Author 阅读全文
posted @ 2020-12-23 21:09 anobscureretreat 阅读(117) 评论(0) 推荐(0)
摘要: code class ListNode: def __init__(self,x): self.val=x self.next=None def listToListNode(input): # Generate list from the input numbers = [int(x) for x 阅读全文
posted @ 2020-12-23 21:07 anobscureretreat 阅读(456) 评论(0) 推荐(0)
摘要: code pytest pytest_lean2.py -o log_cli=true -o log_cli_level=INFO 阅读全文
posted @ 2020-12-23 21:05 anobscureretreat 阅读(138) 评论(0) 推荐(0)
摘要: code import sqlite3 cx = sqlite3.connect("/Users/macname/Downloads/temp/ibook/db.sqlite3") if(cx): print("success") for i in range(1,70): cx.execute(" 阅读全文
posted @ 2020-12-23 21:03 anobscureretreat 阅读(688) 评论(0) 推荐(0)
摘要: code open -a Google\ Chrome 阅读全文
posted @ 2020-12-23 21:00 anobscureretreat 阅读(1591) 评论(0) 推荐(0)
摘要: code from flask import Flask, send_from_directory import os cur_dir=os.path.dirname(__file__) app = Flask(__name__) @app.route("/download") def index( 阅读全文
posted @ 2020-12-23 19:12 anobscureretreat 阅读(481) 评论(0) 推荐(0)
摘要: code http://www.htmleaf.com/js/jquery/jquery-1.9.1.html 阅读全文
posted @ 2020-12-23 16:39 anobscureretreat 阅读(134) 评论(0) 推荐(0)
摘要: Index.html <!DOCTYPE html> <html> <head> <link href="/static/css/style.css" rel="stylesheet"> <script src="http://code.jquery.com/jquery-2.0.3.min.js" 阅读全文
posted @ 2020-12-23 16:37 anobscureretreat 阅读(115) 评论(0) 推荐(0)
摘要: index.html <!DOCTYPE html> <html> <head> <link href="/static/css/style.css" rel="stylesheet"> <script src="https://cdnjs.cloudflare.com/ajax/libs/reac 阅读全文
posted @ 2020-12-23 16:35 anobscureretreat 阅读(103) 评论(0) 推荐(0)
摘要: 接收json class Root(object): @cherrypy.expose @cherrypy.tools.json_in() def index(self): data = cherrypy.request.json print(data) 返回json import cherrypy 阅读全文
posted @ 2020-12-23 16:32 anobscureretreat 阅读(226) 评论(0) 推荐(0)
摘要: code import cherrypy class MyCookieApp(object): @cherrypy.expose def set(self): cookie = cherrypy.response.cookie cookie['cookieName'] = 'cookieValue' 阅读全文
posted @ 2020-12-23 16:31 anobscureretreat 阅读(132) 评论(0) 推荐(0)
摘要: code cherrypy.log("hello there") test.py import logging import logging.config import cherrypy logger = logging.getLogger() db_logger = logging.getLogg 阅读全文
posted @ 2020-12-23 16:24 anobscureretreat 阅读(215) 评论(0) 推荐(0)
摘要: tut12.py import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return "Hello world!" @cherrypy. 阅读全文
posted @ 2020-12-23 16:20 anobscureretreat 阅读(112) 评论(0) 推荐(0)
摘要: 目录结构 index.html <!DOCTYPE html> <html> <head> <link href="/static/css/style.css" rel="stylesheet"> <script src="http://code.jquery.com/jquery-2.0.3.mi 阅读全文
posted @ 2020-12-23 16:16 anobscureretreat 阅读(116) 评论(0) 推荐(0)
摘要: 目录结构 code import os, os.path import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return """<h 阅读全文
posted @ 2020-12-23 16:10 anobscureretreat 阅读(84) 评论(0) 推荐(0)
摘要: This is why /static/css/style.css is found in public/css/style.css code import os, os.path import random import string import cherrypy class StringGen 阅读全文
posted @ 2020-12-23 16:08 anobscureretreat 阅读(171) 评论(0) 推荐(0)
摘要: code import random import string import cherrypy @cherrypy.expose class StringGeneratorWebService(object): @cherrypy.tools.accept(media='text/plain') 阅读全文
posted @ 2020-12-23 15:59 anobscureretreat 阅读(161) 评论(0) 推荐(0)
摘要: code import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return """<html> <head></head> <body 阅读全文
posted @ 2020-12-23 15:55 anobscureretreat 阅读(129) 评论(0) 推荐(0)
摘要: code import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return """<html> <head></head> <body 阅读全文
posted @ 2020-12-23 15:53 anobscureretreat 阅读(104) 评论(0) 推荐(0)
摘要: code import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return "Hello world!" @cherrypy.expo 阅读全文
posted @ 2020-12-23 15:51 anobscureretreat 阅读(149) 评论(0) 推荐(0)
摘要: code import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return "Hello world!" @cherrypy.expo 阅读全文
posted @ 2020-12-23 15:47 anobscureretreat 阅读(110) 评论(0) 推荐(0)
摘要: code import cherrypy class HelloWorld(object): @cherrypy.expose def index(self): return "Hello world!" if __name__ == '__main__': cherrypy.quickstart( 阅读全文
posted @ 2020-12-23 15:46 anobscureretreat 阅读(106) 评论(0) 推荐(0)
摘要: app.conf [/favicon.ico] tools.staticfile.on: True tools.staticfile.filename: "/path/to/myfavicon.ico" test.py import cherrypy class HelloWorld(object) 阅读全文
posted @ 2020-12-23 15:43 anobscureretreat 阅读(170) 评论(0) 推荐(0)
摘要: app.conf [/] tools.gzip.on: True [googleapi] key = "..." appid = "..." test.py class Root(object): @cherrypy.expose def index(self): google_appid = ch 阅读全文
posted @ 2020-12-23 15:41 anobscureretreat 阅读(109) 评论(0) 推荐(0)
摘要: 第一种 app.conf [/] tools.gzip.on: True test.py cherrypy.quickstart(myapp, '/', "app.conf") 第二种 class Root(object): @cherrypy.expose @cherrypy.tools.gzip 阅读全文
posted @ 2020-12-23 15:39 anobscureretreat 阅读(235) 评论(0) 推荐(0)
摘要: code import cherrypy class Band(object): def __init__(self): self.albums = Album() def _cp_dispatch(self, vpath): if len(vpath) == 1: cherrypy.request 阅读全文
posted @ 2020-12-23 15:38 anobscureretreat 阅读(137) 评论(0) 推荐(0)
摘要: code from flask import Flask, send_from_directory import os cur_dir=os.path.dirname(__file__) app = Flask(__name__) @app.route("/download") def index( 阅读全文
posted @ 2020-12-23 15:28 anobscureretreat 阅读(668) 评论(0) 推荐(1)
摘要: github地址 https://github.com/.../..../.-/-../ /.--/.../ /-.-./-.-/.../.../..../.-/-../ /.--/.../ /-.-./-.-/.../tree/master 支持的加密方式 https://github.com/. 阅读全文
posted @ 2020-12-23 10:23 anobscureretreat 阅读(953) 评论(0) 推荐(0)
摘要: 安装 sudo apt-get install build-essential 下载 wget https://github.com/jedisct1/libsodium/releases/download/1.0.8/libsodium-1.0.8.tar.gz 解压 tar xf libsodi 阅读全文
posted @ 2020-12-23 09:59 anobscureretreat 阅读(174) 评论(0) 推荐(0)
摘要: 下载地址: https://download.libsodium.org/libsodium/releases/ 支持以下加密方式 salsa20 and chacha20 下载: Wget https://download.libsodium.org/libsodium/releases/libs 阅读全文
posted @ 2020-12-23 09:55 anobscureretreat 阅读(832) 评论(0) 推荐(0)
摘要: code import paho.mqtt.client as mqtt import time import sys HOST = “1.1.1.1" PORT = 1883 def on_connect(client, userdata, flags, rc): print("Connected 阅读全文
posted @ 2020-12-23 00:42 anobscureretreat 阅读(416) 评论(0) 推荐(0)
摘要: 不转义 var lyric ={{lyrics| safe}}; 阅读全文
posted @ 2020-12-23 00:35 anobscureretreat 阅读(204) 评论(0) 推荐(0)
摘要: text/html(默认的,html文件) text/plain(纯文本) text/css(css文件) text/javascript(js文件) application/x-www-form-urlencoded(普通的表单提交) multipart/form-data(文件提交) appli 阅读全文
posted @ 2020-12-23 00:33 anobscureretreat 阅读(705) 评论(0) 推荐(0)
摘要: code #coding=utf-8 from flask import Flask,Response,jsonify,render_template,send_from_directory,make_response from flask_restful import Api, Resource, 阅读全文
posted @ 2020-12-23 00:32 anobscureretreat 阅读(129) 评论(0) 推荐(0)
摘要: xxx.py:9: DeprecationWarning: The import 'werkzeug.FileStorage' is deprecated and will be removed in Werkzeug 1.0. Use 'from werkzeug.datastructures i 阅读全文
posted @ 2020-12-23 00:31 anobscureretreat 阅读(88) 评论(0) 推荐(0)
摘要: code import werkzeug from flask import Flask import tarfile from flask_restful import Resource, Api, reqparse from werkzeug.datastructures import File 阅读全文
posted @ 2020-12-23 00:30 anobscureretreat 阅读(552) 评论(0) 推荐(0)
摘要: code from flask import Flask from flask import jsonify import random app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello World!' @a 阅读全文
posted @ 2020-12-23 00:29 anobscureretreat 阅读(224) 评论(0) 推荐(0)
摘要: 如果是application/json方式 from flask_restful import request dict = request.json() 如果是application/x-www-form-urlencoded方式 from flask_restful import request 阅读全文
posted @ 2020-12-23 00:28 anobscureretreat 阅读(874) 评论(0) 推荐(0)
摘要: code @app.route('/‘) def hello_world(): return render_template('index.html’) 阅读全文
posted @ 2020-12-23 00:26 anobscureretreat 阅读(165) 评论(0) 推荐(0)
摘要: code from flask import Flask,Response from flask_restful import Api, Resource, reqparse import werkzeug app = Flask(__name__) api = Api(app) class Upl 阅读全文
posted @ 2020-12-23 00:25 anobscureretreat 阅读(1561) 评论(0) 推荐(0)
摘要: code from flask import Flask from flask_restful import Api, Resource, reqparse import werkzeug app = Flask(__name__) api = Api(app) class Uploads(Reso 阅读全文
posted @ 2020-12-23 00:21 anobscureretreat 阅读(445) 评论(0) 推荐(0)
摘要: code from flask import Flask from flask_restful import Api,Resource app = Flask(__name__) api = Api(app) class HelloWorld(Resource): def get(self): re 阅读全文
posted @ 2020-12-23 00:20 anobscureretreat 阅读(102) 评论(0) 推荐(0)
摘要: code from flask import Flask from flask_restful import reqparse, abort, Api, Resource app = Flask(__name__) api = Api(app) TODOS = { 'todo1': {'task': 阅读全文
posted @ 2020-12-23 00:17 anobscureretreat 阅读(325) 评论(0) 推荐(0)
摘要: code Xampp(mysql) Pycharm(vscode) Navicat 阅读全文
posted @ 2020-12-23 00:14 anobscureretreat 阅读(118) 评论(0) 推荐(0)
摘要: code pip3.7 install flask-wtf 阅读全文
posted @ 2020-12-23 00:12 anobscureretreat 阅读(92) 评论(0) 推荐(0)
摘要: 保证Url唯一性 Demo1 from flask import Flask app = Flask(__name__) @app.route("/hello") def hello(): return "hello world" app.run() 浏览器访问/hello 浏览器访问/hello/ 阅读全文
posted @ 2020-12-23 00:07 anobscureretreat 阅读(57) 评论(0) 推荐(0)
摘要: 新建一个config.py文件,参数必须全部大写 DEBUG=True fisher.py from flask import Flask app = Flask(__name__) app.config.from_object("config") @app.route("/hello") def 阅读全文
posted @ 2020-12-23 00:03 anobscureretreat 阅读(101) 评论(0) 推荐(0)