Hi, I am trying to setup mail2script work with Django. My test script works but when I try to use Django models in script I get ImportError: No module named django.contrib.auth.models. I think I have to somehow add Django to path in the script or something but couldn make it work yet. This is how I have tried it.
Any help? asked 02 Dec '10, 20:19 tiparkki |
It appears that the script specified in your Control Panel email configuration does not exist (that is; the path is entered incorrectly). Also, you are explicitly adding '/home/my_user/lib/python2.6/django' to sys.path, which does not allow the importing of "django.contrib.auth.models", but instead "contrib.auth.models". To fix this, you will probably want to remain with the standard '/home/my_user/lib/python2.6' so as not to include the contents of the django module, but rather the module itself. answered 02 Dec '10, 21:01 ryans ♦♦ thanks ryans! There was typo in email configuration, thanks for pointing it out. Now it worked when I specified the path like you proposed. Thanks a lot!
(02 Dec '10, 21:08)
tiparkki
|