摘要:
基本操作:登陆: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
阅读(281)
评论(0)
推荐(0)
摘要:
code import os print(__file__) print(os.path.dirname(__file__)) print(os.path.abspath(__file__)) 阅读全文
posted @ 2020-12-24 17:46
anobscureretreat
阅读(154)
评论(0)
推荐(0)
摘要:
学习目标 基本使用 过滤器&自定义过滤器 控制代码块 宏、继承、包含 Flask 的模板中特有变量和方法 CSRF Jinja2模板引擎简介(template) 模板 视图函数的主要作用是生成请求的响应,这是最简单的请求。实际上,视图函数有两个作用:处理业务逻辑和返回响应内容。在大型应用中,把业务逻 阅读全文
posted @ 2020-12-24 10:41
anobscureretreat
阅读(774)
评论(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
阅读(74)
评论(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
阅读(146)
评论(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
阅读(648)
评论(0)
推荐(0)
摘要:
code unzip xxx.zip 阅读全文
posted @ 2020-12-24 00:30
anobscureretreat
阅读(106)
评论(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
阅读(132)
评论(0)
推荐(0)
摘要:
code response = HttpResponseRedirect(redirect_to=book.book_url) return response 阅读全文
posted @ 2020-12-24 00:26
anobscureretreat
阅读(113)
评论(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
阅读(84)
评论(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
阅读(128)
评论(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
阅读(134)
评论(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
阅读(129)
评论(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
阅读(146)
评论(0)
推荐(0)
摘要:
code 安装完成后可uwsgi --version查看版本, uwsgi --python-version还可以间接查看到python的版本。 阅读全文
posted @ 2020-12-24 00:14
anobscureretreat
阅读(1655)
评论(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
阅读(224)
评论(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
阅读(82)
评论(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
阅读(630)
评论(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
阅读(69)
评论(0)
推荐(0)

浙公网安备 33010602011771号