Opened 15 years ago
Closed 15 years ago
#13685 closed (fixed)
get_connection() fails to initialize
| Reported by: | Alex Gaynor | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | 1.2 |
| Severity: | Keywords: | get_connection | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
> from django.core import mail
> connection = mail.get_connection(backend="django.core.mail.backends.smtp")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/alwaysdata/python/django/1.2.1/django/core/mail/__init__.py", line 41, in get_connection
return klass(fail_silently=fail_silently, **kwds)
TypeError: 'module' object is not callable
Change History (4)
comment:1 by , 15 years ago
| Description: | modified (diff) |
|---|---|
| Resolution: | → invalid |
| Status: | new → closed |
comment:2 by , 15 years ago
The documentation says it should be "django.core.mail.backends.smtp" by default: http://docs.djangoproject.com/en/dev/ref/settings/#email-backend
That was confusing for me.
I removed
EMAIL_BACKEND = 'django.core.mail.backends.smtp'
from settings.py and the problem has gone
comment:3 by , 15 years ago
| Component: | django.core.mail → Documentation |
|---|---|
| Resolution: | invalid |
| Status: | closed → reopened |
| Triage Stage: | Unreviewed → Accepted |
So the settings doc is wrong and needs to be corrected.
comment:4 by , 15 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Note:
See TracTickets
for help on using tickets.
Shouldn't that be:
?
I would expect to pass in the same as what the default setting value is: http://docs.djangoproject.com/en/dev/topics/email/#smtp-backend...and that seems to work fine.