#23253 closed Bug (worksforme)
"MANAGERS" setting doesn't correctly process the value, if it is given as described in the documentation
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Mail) | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django 1.6.5
According to the docs (https://docs.djangoproject.com/en/1.6/ref/settings/#managers) MANAGERS expects a tuple
of the same format as for ADMINS, that is tuple of tuples.
In the practice it crashes with an error:
PATH_TO_MY_VIRTUAL_ENV/lib/python3.4/site-packages/django/core/mail/message.py", line 244, in message
msgTo = self.extra_headers.get('To', ', '.join(self.to))
TypeError: sequence item 0: expected str instance, tuple found
That is system currently expects it to be a tuple of strings, not other tuples. If given so, everything works fine.
Change History (2)
comment:1 by , 10 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
My bad, sorry. Looks like a minor difference in function parameters.
I'm using send_mail() and it expects list of strings, it cannot just take MANAGERS instead.
Thank you.
Hi,
What code is triggering this error (can you also provide the full traceback)?
Using the example from the documentation, I can't reproduce your error (I tried on master and on 1.6):
I'm closing this as
worksforme
. Can you please reopen with the full traceback?Thanks.