0

I'm running Django locally through Google App Engine's dev_appserver.py ./ and when I add this one line to my script:

from google.appengine.ext import deferred

I get the error: ImportError: No module named webapp2 from the deferred module.

I tried adding this to my libraries in app.yaml:

- name: webapp2
  version: latest

But that doesn't work either. I feel like it doesn't make sense to use webapp2 when I'm running Django... Is it not possible to use deferred with Django on Google App Engine?

I'm trying to queue Django's send_mail() for a contact form, and I don't want the User to have to wait for it to be sent.

Not sure if this helps, but here's part of my Python Path which is displayed with the import error:

'/usr/local/google-cloud-sdk/platform/lib/MySQLdb-1.2.5',
'/usr/local/google-cloud-sdk/platform/lib/django-1.4',
'/usr/local/google-cloud-sdk/platform/lib/webapp2-2.5.2',
'/usr/local/google-cloud-sdk/platform/lib/protorpc-1.0',
'/usr/local/google-cloud-sdk/platform/lib/webob-1.1.1',
'/usr/local/google-cloud-sdk/platform/lib/yaml-3.10'

As you can see, it is loading webapp2 into the python path.

ThePloki
  • 185
  • 13

0 Answers0