摘要:
基本操作:登陆:mysql -uroot -h127.0.0.1 -P3306 -pmysql -uroot -p(本机不用写host)退出mysql:ctrl+z+回车,或者exit端口号默认是3306,但是可以通过安装目录下的配置文件修改。 #安装pymysql pip3 install pym 阅读全文
posted @ 2020-12-24 22:53
anobscureretreat
阅读(291)
评论(0)
推荐(0)
摘要:
code import os print(__file__) print(os.path.dirname(__file__)) print(os.path.abspath(__file__)) 阅读全文
posted @ 2020-12-24 17:46
anobscureretreat
阅读(159)
评论(0)
推荐(0)
摘要:
学习目标 基本使用 过滤器&自定义过滤器 控制代码块 宏、继承、包含 Flask 的模板中特有变量和方法 CSRF Jinja2模板引擎简介(template) 模板 视图函数的主要作用是生成请求的响应,这是最简单的请求。实际上,视图函数有两个作用:处理业务逻辑和返回响应内容。在大型应用中,把业务逻 阅读全文
posted @ 2020-12-24 10:41
anobscureretreat
阅读(782)
评论(0)
推荐(0)
摘要:
一.返回html 新建一个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-24 10:19
anobscureretreat
阅读(81)
评论(0)
推荐(0)
摘要:
cat /etc/nginx/nginx.conf # For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Rus 阅读全文
posted @ 2020-12-24 00:37
anobscureretreat
阅读(148)
评论(0)
推荐(0)
摘要:
code uwsgi_param QUERY_STRING $query_string; uwsgi_param REQUEST_METHOD $request_method; uwsgi_param CONTENT_TYPE $content_type; uwsgi_param CONTENT_L 阅读全文
posted @ 2020-12-24 00:32
anobscureretreat
阅读(651)
评论(0)
推荐(0)
摘要:
code unzip xxx.zip 阅读全文
posted @ 2020-12-24 00:30
anobscureretreat
阅读(109)
评论(0)
推荐(0)
摘要:
code #coding=utf-8 from django.shortcuts import render from django.http import HttpResponse from django.core.paginator import Paginator,EmptyPage,Page 阅读全文
posted @ 2020-12-24 00:29
anobscureretreat
阅读(137)
评论(0)
推荐(0)
摘要:
code response = HttpResponseRedirect(redirect_to=book.book_url) return response 阅读全文
posted @ 2020-12-24 00:26
anobscureretreat
阅读(118)
评论(0)
推荐(0)
摘要:
code macname@MacdeMBP ibook % python3 manage.py makemigrations Migrations for 'booklist': booklist/migrations/0022_auto_20200505_1224.py - Remove fiel 阅读全文
posted @ 2020-12-24 00:23
anobscureretreat
阅读(88)
评论(0)
推荐(0)
摘要:
code macname@MacdeMBP ibook % python3 manage.py shell Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Ty 阅读全文
posted @ 2020-12-24 00:21
anobscureretreat
阅读(136)
评论(0)
推荐(0)
摘要:
code from django.http import HttpResponse import json def test(request): result = {"status":"错误","data":"","city":"北京"} #json返回为中文 return HttpResponse 阅读全文
posted @ 2020-12-24 00:19
anobscureretreat
阅读(143)
评论(0)
推荐(0)
摘要:
code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="ko" lan 阅读全文
posted @ 2020-12-24 00:17
anobscureretreat
阅读(135)
评论(0)
推荐(0)
摘要:
code from .models import UserProfile from django.contrib.auth.hashers import make_password user_profile = UserProfile() user_profile.username = userna 阅读全文
posted @ 2020-12-24 00:16
anobscureretreat
阅读(153)
评论(0)
推荐(0)
摘要:
code 安装完成后可uwsgi --version查看版本, uwsgi --python-version还可以间接查看到python的版本。 阅读全文
posted @ 2020-12-24 00:14
anobscureretreat
阅读(1666)
评论(0)
推荐(0)
摘要:
code { 'code': '10022200', 'msg': 'Success', 'buyer_logon_id': '155******51', 'buyer_pay_amount': '0.10', 'buyer_user_id': '208883212323143623772091', 阅读全文
posted @ 2020-12-24 00:13
anobscureretreat
阅读(228)
评论(0)
推荐(0)
摘要:
#old /usr/bin/uwsgi -> /usr/local/python3/bin/uwsgi code #安装uwsgi 1069 wget http://projects.unbit.it/downloads/uwsgi-latest.tar.gz 1072 tar -xvf uwsgi 阅读全文
posted @ 2020-12-24 00:12
anobscureretreat
阅读(298)
评论(0)
推荐(0)
摘要:
code */5 * * * * /usr/local/bin/python3.7 /root/ibook/check_is_still.py >> /root/log.log 2>&1 阅读全文
posted @ 2020-12-24 00:11
anobscureretreat
阅读(83)
评论(0)
推荐(0)
摘要:
code /* 创建 XMLHttpRequest 对象 */ var xmlHttp; function GetXmlHttpObject(){ if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari 阅读全文
posted @ 2020-12-24 00:10
anobscureretreat
阅读(639)
评论(0)
推荐(0)
摘要:
code $.get("/weather_code/", { city:"上海", time:"2019-04-05" }, function(result){ alert("返回数据: \n" + "reason:"+ result.reason +"\n"+"weather_name:"+ re 阅读全文
posted @ 2020-12-24 00:09
anobscureretreat
阅读(70)
评论(0)
推荐(0)
摘要:
code $.ajax({ url: "/cal/", type: "post", data: { "n1":$("#num1").val(), "n2":$("#num2").val(), }, success:function (data) { console.log(data); $("#re 阅读全文
posted @ 2020-12-24 00:08
anobscureretreat
阅读(285)
评论(0)
推荐(0)
摘要:
code pip3.7 install django-extensions pip3.7 install django-werkzeug-debugger-runserver pip3.7 install pyOpenSSL #制作ssl证书 openssl genrsa -des3 -passou 阅读全文
posted @ 2020-12-24 00:07
anobscureretreat
阅读(99)
评论(0)
推荐(0)
摘要:
首先安装pyenv macname@MacdeMacBook-Pro Desktop % mkdir fish macname@MacdeMacBook-Pro Desktop % cd fish macname@MacdeMacBook-Pro fish % pip3 install pipenv 阅读全文
posted @ 2020-12-24 00:06
anobscureretreat
阅读(382)
评论(0)
推荐(0)
摘要:
code import socket sk = socket.socket() sk.bind(("127.0.0.1", 8080)) sk.listen(5) while True: conn, addr = sk.accept() data = conn.recv(8096) conn.sen 阅读全文
posted @ 2020-12-24 00:02
anobscureretreat
阅读(81)
评论(0)
推荐(0)
摘要:
图片 code <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>使用jQuery UI修饰title属性的气泡悬浮框(Tooltip) 阅读全文
posted @ 2020-12-24 00:01
anobscureretreat
阅读(2457)
评论(0)
推荐(0)

浙公网安备 33010602011771号