2

I am about to start ramping up on Django and develop a web app that I want to deploy on Google App Engine. I learn that Google has Django 0.96 already installed on the APP engine, but the latest "official" version of Django I see is at 1.2.3 and its a bit of an effort to install it there.

I am curious which version of Django is most widely used.

So, can you please guide me on which Django version I should ramp on and deploy based on the following criterion

  1. Stability and suitability for production release
  2. Availability for applications (or plugins) and which version is most supported by the community

Thanks a lot!

3 Answers 3

3

Most people are currently using Django 1.2. You should not use or learn Django .96 - it's VERY old, and learning to use it won't prepare you for any non-app-engine Django work since things have changed significantly since then.

Django on App Engine is something of a pain, since you lose a lot of the ORM, which is a really nice reason to be working with Django. You also lose the ability to simply drop-in plugins and reusable apps that use any of the Django ORM. Anything with a models.py won't work.

Take a look at google-app-engine-django for help getting a more recent version running.

http://code.google.com/p/google-app-engine-django/

There is work to integrate the GAE storage engine into Django, and several projects have variously working implementations, but I wouldn't expect really good ORM support for a while yet - 1.3 (which is still several months from release) will include hooks that make it easier to write NoSQL backends, but Django probably won't ship with one.

While there are security releases for old versions of Django, you should really be developing using the latest stable version. Major releases of Django have a very strong backwards compatibility promise, so going from 1.2 to 1.3 when it comes out will be pretty seamless.

I strongly encourage you to think long and hard about what precisely App Engine offers your specific application before spending a lot of energy getting things working there. You lose application portability, scaling is still hard, and you don't save money if your application gets popular. App Engine is not a forgiving introductory platform.

For more conversation on this topic, take a look at this question:

Why use Django on Google App Engine?

particularly my answer there and the comments on it.

Sign up to request clarification or add additional context in comments.

8 Comments

Thanks! Where do you deploy your Django apps then? Any suggestions?
I want something that is very scalable and has a Free quota. My budget is very little, so my spending on the hosting will be dependent on how much traffic I get.
I deploy my apps with Rackspace and Slicehost in VPS setups. Since I pay for hosting already, adding another small project doesn't cost me anything, and then I can split it off if it grows. You can really deploy a Django app on most hosting. "Free" tends to bite you in the end. The Rackspace offering is very cheap (I pay $10/mo/server before bandwidth). Another option that scales easily is Amazon's AWS. They're currently offering a free "micro" instance to new customers for a year. aws.amazon.com/free
The above might not be for you, since managing a server is a pretty specialized set of talents. If that's not your cup of tea, you might consider Media Temple's offering: mediatemple.net/webhosting/gs/features/containers.php
Obviously I'm biased (I'm on the App Engine team), but I take issue with several of your assertions: Application portability is available with projects such as AppScale (googleappengine.blogspot.com/2010/10/…) and TyphoonAE (code.google.com/p/typhoonae), scaling is always hard, but it's easier on App Engine, you do save money (googleappengine.blogspot.com/2010/06/…) and it's an excellent introductory platform (code.google.com/appengine/docs/python/gettingstarted).
|
3

app engine permits you to use other versions of django out of the box, with only a little pain, using google.appengine.dist.use_library. essentially, your main.py (the module specified by app.yaml to handle urls) should look like this:

import wsgiref.handlers


from google.appengine.ext import webapp
from google.appengine.ext.webapp import util

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

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

import django.core.handlers.wsgi
def main():
  application = django.core.handlers.wsgi.WSGIHandler()
  # Run the WSGI CGI handler with that application.
  webapp.util.run_wsgi_app(application)

if __name__ == '__main__':
  main()

2 Comments

Yes, but Django doesn't work out of the box on App Engine, which was the whole point of the question.
The above code is specific to app engine. Using 0.98 is unconscionable, although it is the default version imported with import django, app engine has 1.1 available, though, which isn't nearly as painful. It's not the latest, but it's probably good enough for most uses. Unless you need a feature that is just not around in 1.1, the above method is much easier to deal with than uploading another version.
0

Another thing to consider is how you install. I'd be sure to install django from SVN, because it makes updating it MUCH easier.

I have been using the dev version for a while on my site, and haven't encountered a single bug yet, aside from one that affected the admin site in a minor way (which a svn up fixed).

I don't have a feel for whether people are using 1.2 or dev, but in my experience, dev is perfectly suitable. Any major errors that you may have in the code will get fixed very quickly, and svn up will get you to the latest code on the off chance that you get a revision with a major bug.

1 Comment

The dev version is relatively stable, but the build does periodically get broken. It's great for development, but I wouldn't run a production site on it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.