有没有一种Python本机方法可以通过ssh隧道将django连接到数据库?我见过有人在主机中使用 ssh 端口转发,但我更喜欢一个可以轻松容器化的解决方案。
我正在尝试dnspython
使用import dnspython
.
pip3 freeze
显示该软件包已安装,但我不断收到错误消息 ModuleNotFoundError: No module named 'dnspython'
我试过了:
pip3 install dnspython
pip3 install git+https://github.com/rthalley/dnspython
sudo python setup.py install
pip3 install dnspython3
并import dnspython3
在脚本中使用我知道这篇关于 python 2.7 的帖子,但没有一个解决方案有效。
是否可以在 SQLModel 创建的模型中使用 PostGIS 几何类型?如果是的话,该怎么办?
python ×3
django ×1
dnspython ×1
geoalchemy2 ×1
postgis ×1
python-3.6 ×1
sqlmodel ×1
ssh-tunnel ×1