在Django项目中,数据库的配置信息通常存储在项目的settings.py文件中,具体在DATABASES设置项下。这个设置项是一个字典(dictionary),其中包含了数据库的连接信息,包括数据库引擎、数据库名称、用户、密码、主机地址和端口等信息。查看数据库配置信息的步骤如...
yekong
1周前 (04-16) 53℃
0喜欢
django运行报错了
django.db.utils.NotSupportedError: MySQL 8.0.11 or later is required (found 5.7.30).
Django数据库连接MySQL时报错
System check identifie...
yekong
1周前 (04-16) 62℃
0喜欢
pip install mysqlclient安装报错了
pip install mysqlclient
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting mysqlclient
Usi...
yekong
1周前 (04-16) 54℃
0喜欢
xlsxwriter
python第三方模块
用于向生成的Excel表格,插入数据,图表操作。
安装
pip install xlsxwriter
导入
import xlsxwriter
...
yekong
3年前 (2021-08-28) 1253℃
1喜欢
import xlwt
from PIL import Image
wb = xlwt.Workbook()
img = Image.open("123.png")
r, g, b, a = img.split()
img = Image.merge(&qu...
yekong
3年前 (2021-08-24) 2525℃
4喜欢
# 创建工作簿
wb = xlwt.Workbook()
# 创建工作表
ws = wb.add_sheet('CNY')
# 循环写入数据
data = (('Date', '英镑', '人民币', '港...
yekong
3年前 (2021-08-24) 1528℃
0喜欢
xlwt为Python第三方模块,用来写入Excel表格数据
安装:
pip install xlwt
导入:
import xIwt
...
yekong
3年前 (2021-08-24) 1366℃
2喜欢
data = xlrd.open_workbook('name.xlsx')
sheet = data.sheet_by_index(0)
print(sheet.cell(1, 0)) # 获取指定单元格内容 第二行 第一列
print(sheet.cell...
yekong
3年前 (2021-08-24) 1211℃
0喜欢
import xlwt
# 创建工作簿
wb = xlwt.Workbook()
wb.save('2019-CNY.xls')
...
yekong
3年前 (2021-08-24) 1075℃
0喜欢
data = xlrd.open_workbook('name.xlsx')
sheet = data.sheet_by_index(0)
print(sheet.cell_type(1, 1)) # 获取指定单元格类型
print(sheet.cell(1, ...
yekong
3年前 (2021-08-24) 1484℃
0喜欢