Ticket #5095: newforms_settings.patch

File newforms_settings.patch, 517 bytes (added by Chris Beaven, 17 years ago)
  • django/newforms/fields.py

     
    343343try:
    344344    from django.conf import settings
    345345    URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT
    346 except ImportError:
     346except (ImportError, EnvironmentError):
    347347    # It's OK if Django settings aren't configured.
    348348    URL_VALIDATOR_USER_AGENT = 'Django (http://www.djangoproject.com/)'
    349349
Back to Top