Don't access MANDRILL_API_URL setting at module level

Move MANDRILL_API_URL setting lookup into Djrill
backend init (where it's used).

Because "modules should not in general use settings
stored in django.conf.settings at the top level".
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/#use-of-django-conf-settings
This commit is contained in:
medmunds
2015-11-30 17:20:27 -08:00
parent 3a6e0ebb30
commit 632334b426
2 changed files with 2 additions and 10 deletions

View File

@@ -1,10 +1,2 @@
from django.conf import settings
from djrill.exceptions import MandrillAPIError, NotSupportedByMandrillError
from ._version import __version__, VERSION
# This backend was developed against this API endpoint.
# You can override in settings.py, if desired.
MANDRILL_API_URL = getattr(settings, "MANDRILL_API_URL",
"https://mandrillapp.com/api/1.0")