I have a django application that runs on Google App Engine. I use djangoappengine and django-nonrel and it works fine (with the complete source code of django in my App Engine project dir).
I've noticed that GAE offers support for django by adding the following lines to app.yaml
:
libraries:
- name: django
version: 1.5
I would like to use it instead of putting the entire django-nonrel source code in my project dir.
When I remove django-nonrel from my project dir, I get the following ImportError from djangoappengine/boot.py
:
ImportError: No module named django.conf
It looks like djangoappengine can't find any version of django - not the one installed on my python installation, and not the ones come with AppEngine.
How can I make the dev server use the AppEngine version of django? Or am I missing something?
Update:
When I manually edit djangoappengine/boot.py
and add
sys.path.append(r'<PATH TO GAE API>/google_appengine/lib/django-1.5')
It works. Any way to add to the path without editing djangoappengine
?
The Django module included with the GAE SDK is "regular" Django, not django-nonrel. "regular" Django can only deal with SQL databases, it can't deal with GAE's datastore.
If you're using CloudSQL, use "regular" Django. If you're using the HRD datastore, use django-nonrel.
The error you're seeing is because djangoappengine (and djangotoolbox) only work with django-nonrel. They won't work with "regular" django.