I'm working on a web app and decided that for the max amount of speed I'm going to make it a single page. Then load all the content via AJAX pulling the data from a Django app. My options as I see them are:

Host the index.html(and JS, IMG, CSS) on Cloud files/S3/etc and the Django app on a server on api.example.com

Host the index.html(and such) on a dedicated server and put the app under as sub folder ie example.com/app

Host the index.html(and such) on a dedicated server and somehow host Django on the root. Letting Apache decide which one to send the user to. (similar to this question)

If you have another way that could be better please let me know.


  • I'd recommend doing this only if know for a fact that it's required. An HTTP request is an HTTP request, whether it's for an AJAX resource or a web page.
    – Joe
    Jun 6, 2011 at 15:39
  • Agreed. This is not a good idea. There's no true speed benefit over using AJAX versus loading a new page, assuming you have proper resource caching in place. The worst part is that it makes your app unnavigable, unless you're going to tack on HTML5 features like History (very limited support) and/or Storage (more but not much more support).
    – chrisdpratt
    Jun 6, 2011 at 15:48
  • What I'm working on is very simple, just a google map with some buttons. When you click on the buttons different data populates on the map. Each time the last set being cleared. Really the only reason for using Django at all is for a small amount of custom GIS info that I can't pull from Google places. Does this make any more sense?
    – Kerry Hatcher
    Jun 6, 2011 at 22:19

2 Answers 2


I currently host a Python app on Google's App Engine and expose an API to a static JavaScript-heavy web app that runs on a cheap shared hosting account elsewhere. It works great and it's cheap to run.

It looks like you can run Django on Google's App Engine too.


If it's a Google Maps mashup most of the JS is already going to be hosted by Google.

How large is your GIS dataset you're using Django for? Depending on its size you may be able to run a job to make it available as JSON, and not need for your Django to handle user requests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.