django使用多个数据库

通过官方文档https://docs.djangoproject.com/zh-hans/3.1/topics/db/multi-db/和csdnhttps://blog.csdn.net/songfreeman/article/details/70229839的这两篇文章可以进行多数据库的设置。但是设置后可能会出现问题,由于我连接的数据库是通过inspactdb的方法得到的model。于是在migrate的时候出现了问题,会提示 1146, “Table xxx doesn’t exist” 。后来发现问题可能出在路由表上,按照DATABASE_APPS_MAPPING映射之后,django默认的表如果要写入可能会找不到数据库。而源代码里的映射关系并不包含新加入的app,例如grappelli等。

DATABASE_APPS_MAPPING = {
# example:
# 'app_name':'database_name',
# 'admin': 'default',
# 'users': 'default', #django
'basic_estate': 'basic_estate',
'footstone': 'footstone',
'mall': 'hsmall',
'iot_biz': 'iot_biz',
'mall': 'mall',
'hsuser': 'hsuser',
}
Continue Reading

Delphi RAD Studio 10.4 Sydney Architect 27.0 完美免费注册版

RAD Studio 10.4是一个开发人员的终极RAD环境,带来你想象不到的开发应用程序的便捷性和速度,并具有所有你需要用到的能力和功能,轻松提高生产力,该环境使用强大的可视化设计工具和集成的工具链在现代C ++和Delphi中快速构建高性能的本机跨平台应用程序!

RAD Studio 10.4提供了显着增强的高性能本机Windows支持,通过出色的快速代码完成功能提高了生产率,通过托管记录提高了代码速度,并在现代多核CPU上增强了并行任务,提供了1000多个质量和性能增强功能。此版本在整个产品中添加了重要的新功能和增强的Windows功能,此外还跨支持的平台提供了重要的生产力和性能增强功能。让应用程序更快,功能更强,使用更人性化,更轻松地维护应用程序的向前发展。

RAD Studio 10.4是多年来对Delphi代码工具改进最大的一次,使用语言服务器协议(LSP)实现提供了Code Insight。在处理具有数百万行代码的大型项目时,10.4可大大提高开发人员的工作效率。

Continue Reading

Borland Delphi 7 Science Edition 2020 (x86) (12.2020)

Size File: 1.72 GB

Delphi 7 is a well-known program from Borland, namely a development tool for programming both at the initial and professional levels. One of the best and most popular products from Borland.


The package includes an extended developer kit – more than a hundred third-party components and fixes, correctly configured to avoid conflicts during use.

Add. Information: Since 2004, this package has been successfully used to create software for laboratory instruments, including for communication of equipment with a personal computer, and has been constantly expanded with components of third-party developers. The issue of licensing the package remains open, since the Delphi 7 environment is not officially supported, but all components in the package are full working and verified versions. The environment installer is quite interactive and implemented as a Web interface. Please read the readme.doc file for installation difficulties.
The assembly is supplied with a huge number of examples.

Continue Reading

Cannot open pip-script.py

这几天一直在折腾faceswap,安装过程中发现各种神奇的bug。首先第一个就是github无法正常访问的问题,clone代码的时候各种提示服务器连接超时。可以修改hosts文件添加以下内容:

# github
#192.30.255.113 github.com
#192.30.255.113 gist.github.com
#151.101.52.133  raw.githubusercontent.com
#151.101.53.194  github.global.ssl.fastly.net
140.82.114.4 github.com
199.232.69.194 github.global.ssl.fastly.net

添加之后执行dns刷新:

ipconfig /flushdns

然后github基本就可以正常访问了。安装完成之后发现出现了另外一个问题,提示没有tensorflow-gpu环境。但是尝试执行安装时又提示下面的错误:

Continue Reading

m3u8 下载工具 V20.10.28[Win/OS X]

支持的下载方式:

  1. 从m3u8链接下载,参数 -i
  2. 从本地文件读取下载链接下载,参数 -f

参数说明:

  1. 如果直接从m3u8下载链接下载请使用-i参数, 示例:m3u8_downloader -i http://www.h4ck.org.cn/porn/av.m3u8, 同时支持下载mp4、avi文件。直接修改下载链接即可。
  2. 支持从文件读取下载链接批量下载,支持文本格式和csv格式,csv格式可以自定下下载后的文件名。文本格式按照每行一个下载链接组织内容即可。示例:

    m3u8_downloader -f /Users/obaby/Downloads/m3u8_list/f_26.csv

  3. 如果下载单个文件可以通过-o参数指定输出文件名,配合-i参数使用, 实例:m3u8_downloader -i http://www.h4ck.org.cn/porn/av.m3u8 -o av.mp4
  4. 从文件读取下载链接可以通过-p参数指定输出目录,在-p模式下或者没有指定输出文件名称的情况下,程序会自动生成文件名。实例:m3u8_downloader -f /Users/obaby/Downloads/m3u8_list/f_26.csv -p /Volumes/home/Porn/20201023
Continue Reading