08 2021 档案

摘要:webpack是一个前端打包工具,基于node.js开发的,使用时需要有node.js组件支持。 npm是一个包管理工具,例如:如果我们想安装某一个组件,可以使用命令:npm install ***,这个工具是node.js里面自带的。所以如果想使用这个工具,也需要node.js node.js是一 阅读全文
posted @ 2021-08-31 14:51 Shapley 阅读(243) 评论(0) 推荐(0) 编辑
摘要:一.重要概念 app: is a Web application that does something. An app usually is composed of a set of models (database tables), views, templates, tests. projec 阅读全文
posted @ 2021-08-24 11:08 Shapley 阅读(46) 评论(0) 推荐(0) 编辑
摘要:Invoke(Delegate) Executes the specified delegate on the thread that owns the control's underlying window handle. 传统的解释为:在拥有控件基础句柄的线程上执行指定的委托。 问题是什么叫:句 阅读全文
posted @ 2021-08-24 09:53 Shapley 阅读(73) 评论(0) 推荐(0) 编辑
摘要:一:安装uWSGI 1.1安装uWSGI 在/usr/local目录下新建目录:uwsgi,用于存储uWSGI配置文件及日志。配置文件内如如下: # mysite_uwsgi.ini file [uwsgi] # Django-related settings # the base director 阅读全文
posted @ 2021-08-20 17:33 Shapley 阅读(465) 评论(0) 推荐(0) 编辑
摘要:1.安装python3.8.5,见上一篇随笔。 2.安装报错记录: mysqlclient安装出错: OSError: mysql_config not found 解决办法: yum install mysql-devel gcc gcc-devel python-devel 注意如果报错: Er 阅读全文
posted @ 2021-08-20 17:12 Shapley 阅读(335) 评论(0) 推荐(0) 编辑
摘要:centos7环境下安装python3有很多坑,经过不断总结经验教训,把正确的步骤记录下来,便于查询。 注意: 1.不能卸载centos7自带的python2.7,因为yum等软件依赖于python2,而python2和python3不兼容,只能在保留原版本的基础上,重新安装一个python3(本次 阅读全文
posted @ 2021-08-19 18:15 Shapley 阅读(4357) 评论(0) 推荐(1) 编辑
摘要:安装PyMySQL:注意:命令中的PyMySQL是区分大小写的,不能写错。 pip install PyMySQL Collecting PyMySQL Downloading PyMySQL-1.0.2-py3-none-any.whl (43 kB) |█████████████████████ 阅读全文
posted @ 2021-08-19 14:09 Shapley 阅读(2165) 评论(0) 推荐(0) 编辑
摘要:报错原因为缺少共享库: yum whatprovides libSM.so.6 查看下libSM版本,然后,运行命令: yum install libSM-1.2.2-2.el7.x86_64 --setopt=protected_multilib=false 或者 sudo yum install 阅读全文
posted @ 2021-08-18 17:27 Shapley 阅读(843) 评论(0) 推荐(0) 编辑
摘要:给Django项目添加日志,需要在settings.py及views.py页面进行设置。 settings.py页面,添加代码: BASE_LOG_DIR = os.path.join(BASE_DIR, "log") LOGGING = { 'version': 1, # 保留字 'disable 阅读全文
posted @ 2021-08-12 16:41 Shapley 阅读(421) 评论(0) 推荐(0) 编辑
摘要:Django项目在发布时,一般会设置:DEBUG = False,但这时系统不会自动给配置路由,需要我们手工配置,那么配置的方法如何呢?其实很简单,关键有两点: 关键点一: 在项目的urls.py文件中,添加: from django.conf.urls import url, static fro 阅读全文
posted @ 2021-08-12 11:16 Shapley 阅读(118) 评论(0) 推荐(0) 编辑
摘要:Django项目在发布时,一般会设置:DEBUG = False,但这时系统不会自动给配置路由,需要我们手工配置,那么配置的方法如何呢?其实很简单,关键有两点: 关键点一: 在项目的urls.py文件中,添加: from django.conf.urls import url, static fro 阅读全文
posted @ 2021-08-12 11:15 Shapley 阅读(106) 评论(0) 推荐(0) 编辑
摘要:场景描述 有一个对象列表,数据结构如下: [[[[56, 21], [261, 22], [261, 46], [56, 45]], '1、 stackoverflow加速', 0.8046855330467224], [[[55, 76], [674, 76], [674, 100], [55, 阅读全文
posted @ 2021-08-10 10:37 Shapley 阅读(87) 评论(0) 推荐(0) 编辑