Django based forum engine
Dear All:
I follow the directions to finish the installion:
I meet the same question just like:
the error is :
ImproperlyConfigured at /forum/account/signup/
Error importing email backend module mailer.backend: “No module named backend”
Request Method: POST
Request URL: http://127.0.0.1:8000/forum/account/signup/
Django Version: 1.4.3
Exception Type: ImproperlyConfigured
Exception Value:
Error importing email backend module mailer.backend: “No module named backend”
Exception Location: /home/tianhl/workarea/webDev/.env/local/lib/python2.7/site-packages/Django-1.4.3-py2.7.egg/django/core/mail/__init__.py in get_connection, line 35
Python Executable: /home/tianhl/workarea/webDev/.env/bin/python
Python Version: 2.7.3
but I have install the django.mailer at /home/tianhl/workarea/webDev/.env/local/lib/python2.7/site-packages/mailer
I wonder why django can not import mailer.backend.DbBackend?
In setting.py,
try: import mailer INSTALLED_APPS += ('mailer',) EMAIL_BACKEND = "mailer.backend.DbBackend" except ImportError: pass
Offline
after I run ./manage.py syncdb –all
./manage.py send_mail
gives the message as follow:
————————————————————————
acquiring lock…
acquired.
(0.001) SELECT COUNT(*) FROM “mailer_message” WHERE “mailer_message”.“priority” = 1 ; args'1',)
(0.000) SELECT COUNT(*) FROM “mailer_message” WHERE “mailer_message”.“priority” = 2 ; args'2',)
(0.000) SELECT COUNT(*) FROM “mailer_message” WHERE “mailer_message”.“priority” = 1 ; args'1',)
(0.000) SELECT COUNT(*) FROM “mailer_message” WHERE “mailer_message”.“priority” = 2 ; args'2',)
(0.000) SELECT COUNT(*) FROM “mailer_message” WHERE “mailer_message”.“priority” = 3 ; args'3',)
(0.000) SELECT COUNT(*) FROM “mailer_message” WHERE “mailer_message”.“priority” < 4 ; args'4',)
releasing lock…
released.
0 sent; 0 deferred; 0 don't send
done in 0.01 seconds
Offline
u can disable it and use standart django functionality without writing msg to table and senind later
Offline
slav0nic
u can disable it and use standart django functionality without writing msg to table and senind later
try: import mailer INSTALLED_APPS += ('mailer',) #EMAIL_BACKEND = "mailer.backend.DbBackend" EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" except ImportError: pass
Offline
test sending mail from console and read official django docs about this
./manage.py shell
from django.core.mail import send_mail
send_mail(subject, message, from_email, ['admin@example.com'])
Offline
slav0nic
test sending mail from console and read official django docs about this
Edited tianhl (Feb. 25, 2013 05:13:34)
Offline