#9005 closed (fixed)
url templatetag incorrectly assumes settings.SETTINGS_MODULE is not set to None
Reported by: | Matt McDonald | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When rolling your own config using conf.settings.configure() instead of the DJANGO_SETTINGS_MODULE environment variable, settings.SETTINGS_MODULE gets set to None. Any code which assumes that settings.SETTINGS_MODULE has been set to a string would be incorrect.
I've attached a patch to fix an occurrence of this issue in the url templatetag which currently causes an AttributeError: 'NoneType' object has no attribute 'split'.
Attachments (2)
Change History (9)
by , 16 years ago
Attachment: | testfornone.diff added |
---|
comment:1 by , 16 years ago
milestone: | post-1.0 |
---|
comment:2 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 16 years ago
Has patch: | set |
---|
comment:4 by , 16 years ago
Needs tests: | set |
---|
This code needs to have a test associated with it so that this functionality doesn't happen again.
by , 16 years ago
Attachment: | 9005-with-tests.diff added |
---|
Patch with tests. Fails on trunk with above-mentioned error, passed with patch with correct lack of url resolution.
comment:5 by , 16 years ago
Needs tests: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Milestone post-1.0 deleted