How to use Django 1.6 with appengine dev_appserver.py + not supported third library

django, google-app-engine

Solution

On the contrary, the documentation is quite clear about this. Any third-party libraries that are not supplied by the SDK need to be installed within your app directory.

The dev server starts its own sandbox environment and ignores your existing PYTHONPATH, and you can't change sys.path in the production environment anyway.

Problem

I'm trying to set a local environment for a Django app that will be hosted on GAE My first problem: I can't ask Django 1.6 in app.yaml (not supported) so I switched to "latest" version but I'm not sure of what I will get by doing this ? My second one: I want to use some extra library such as "django-taggit". I created a "libs" directory in my project where I copied the "taggit" directory. I added the absolute path to PYTHONPATH first then I moved it to PATH then also tried in wsgi.py with sys.path.append but I keep having an import error (ImportError: No module named taggit) when I'm running dev_appserver.py ? Is it me or there's a lack of documentation about what I want to do ? I spent a lot of time googling without clear results. Everything seems trivial when you follow the google way with webapp2 but much more complicate when you don't. Is GAE a right choice for Django hosting ? Thanks by advance for your help and advice.

Original source