问题描述
美好的一天!
我需要在Python Django上部署一个应用程序,并附带以下库文件:
我必须将它连接到PostgreSQL数据库。
因此,我应该使用哪种环境?标准还是灵活?
和我应该如何将这些库安装到环境中?
PS
我尝试了一切: 最后我有: > 不正确配置:加载psycopg2模块时出错:动态模块 您的出发点应该是指南,并考虑到您的所有要求。 这个要求使得选择变得非常简单。从: 如此灵活的环境。 这取决于您使用的环境。你试过的是标准的env方式。 在灵活的环境中,依赖关系的处理方式不同。来自: Good day! I need to deploy an app on Python Django with following libs: And I have to connect it to PostgreSQL database. So, what environment shall I use? Standard or Flexible? And how shall I install those libraries to the environment? P.S. I've tried everything: In the end I have: Your starting point should be the Choosing an App Engine Environment guide, taking into consideration all your requirements. This requirement makes the choice pretty easy. From Connecting from App Engine: So flexible environment it is. This dependends on the environment you use. What you tried was the standard env way. In the flexible environment dependencies are handled differently. From Dependencies: 这篇关于在带有外部库的Google Cloud App Engine上部署Django项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! app.yaml
, appengine_config.py
,我已经将libs直接安装到源代码('libs'文件夹),并将库添加到 app.yaml
甚至 google.appengine
没有定义init函数(init_psycopg)
app.yaml
, appengine_config.py
, I has installed libs directly to source ('libs' folder), and adding libs to app.yaml
, and even google.appengine.ext.ndb.django_middleware.NdbDjangoMiddleware