After two days of Googling, I cannot find a recent minimal example of Django usage in GAE. Most example use CGI or Python 2.5 (I want to avoid that because I want to be threadsafe).
在google了两天之后,我找不到最近在GAE中使用Django的最小示例。大多数示例使用CGI或Python 2.5(我希望避免使用它,因为我希望是线程安全的)。
Does anyone have sample code or tutorial that i can look at and learn from ?
有没有人有我可以查看和学习的样本代码或教程?
This example need to be in Python 2.7 (WSGI, threadsafe).
这个示例需要在Python 2.7中(WSGI, threadsafe)。
1 个解决方案
#1
2
You can either use 'standard' Django with Cloud SQL or django-nonrel with the datastore.
您可以对云SQL使用“标准”Django,也可以对数据存储使用Django -nonrel。
Using standard Django on Cloud SQL would be pretty much the same as using Django anywhere else. You'll need to set up the database, but otherwise you shouldn't need any GAE specific sample: https://developers.google.com/appengine/docs/python/cloud-sql/django
在云SQL上使用标准Django与在其他任何地方使用Django几乎相同。您需要设置数据库,否则不需要任何GAE特定示例:https://developers.google.com/appengine/appengines/python/cloud -sql/django
Django-nonrel is a bit more involved, but there's a full sample: http://djangoappengine.readthedocs.org/en/latest/
Django-nonrel有点复杂,但是有一个完整的示例:http://djangoappengine.readthedocs.org/en/latest/
#1
2
You can either use 'standard' Django with Cloud SQL or django-nonrel with the datastore.
您可以对云SQL使用“标准”Django,也可以对数据存储使用Django -nonrel。
Using standard Django on Cloud SQL would be pretty much the same as using Django anywhere else. You'll need to set up the database, but otherwise you shouldn't need any GAE specific sample: https://developers.google.com/appengine/docs/python/cloud-sql/django
在云SQL上使用标准Django与在其他任何地方使用Django几乎相同。您需要设置数据库,否则不需要任何GAE特定示例:https://developers.google.com/appengine/appengines/python/cloud -sql/django
Django-nonrel is a bit more involved, but there's a full sample: http://djangoappengine.readthedocs.org/en/latest/
Django-nonrel有点复杂,但是有一个完整的示例:http://djangoappengine.readthedocs.org/en/latest/