开发者

Is it good to use Django 1.1 on App Engine?

We are planning a web application to build on Googl开发者_JS百科e's App Engine platform. Is it good to use the Django 1.1 framework to develop Google App Engine applications?

If not, could you please suggest me the best option available, which has good tutorials and learning resource?


Yes, Django 1.1 is well-supported on Google App Engine. You'll need to do your own installation thereof locally, to enable it in the GAE SDK -- but it's already there for you on the App Engine production servers, see the docs -- just do

import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

from google.appengine.dist import use_library
use_library('django', '1.1')

Edit: Django is by far the leading web app framework for Python, and its popularity is surely well-deserved. However, personally, I use it only when I "have to" (mostly to get collaborators and make them comfy on a project's technology stack) -- maybe because what I tend to develop server-side are more "web services/apps" than "sites" (the UI part I'd rather leave to the browser, with Dojo, jQuery, or Google Closure!-), I find Django too "heavy" for my tastes. I'd rather have Werkzeug, or tipfy -- the latest and greatest super-light Wekzeug-based App Engine - specialized framework!-) -- I love e.g. tipfy's ability to use Jinja2 and/or Mako in lieu of Django's templates, the simple and flexible authentication and session schemes, and the debugger -- in addition to all the luscious, light-weight flexibility of Werkzeug and Webapp. But, hey, that's a very subjective opinion of mine!-)


Google has developed a 'helper' project to aid with Django integration: http://code.google.com/p/google-app-engine-django/

Also, you might check out this video where Guido walks through it: http://sites.google.com/site/io/rapid-development-with-python-django-and-google-app-engine


You should check out appenginepatch (http://code.google.com/p/app-engine-patch/) and django-nonrel (http://www.allbuttonspressed.com/projects/django-nonrel)

I'm using appenginepatch for my website (beta.fiddme.com) and its awesome (there's a full post on the technology stack we're using at http://www.developerzen.com/2009/10/29/building-an-iphone-application/)


You might also want to take a look at Kay Framework. It's based on Django with middleware and such. It is exclusively geared towards App Engine and uses Werkzeug and Jinja2. I have fiddled with it and it all works. I've settled on the already mentioned Tipfy framework. Also comes with Jinja2 (and Mako, it's your choice), it's lightweight and easy to comprehend.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜