mirror of https://github.com/django/django.git
Fixed #5095 -- newforms now checks for EnvironmentError when importing settings. Thanks, SmileyChris
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d1bef59905
commit
babf25c11c
|
@ -344,7 +344,7 @@ url_re = re.compile(
|
|||
try:
|
||||
from django.conf import settings
|
||||
URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT
|
||||
except ImportError:
|
||||
except (ImportError, EnvironmentError):
|
||||
# It's OK if Django settings aren't configured.
|
||||
URL_VALIDATOR_USER_AGENT = 'Django (http://www.djangoproject.com/)'
|
||||
|
||||
|
|
Loading…
Reference in New Issue