Skip to content

Instantly share code, notes, and snippets.

@collinanderson
Created January 31, 2015 21:34
Show Gist options
  • Save collinanderson/6b8be018f1ca45a6c22a to your computer and use it in GitHub Desktop.
Save collinanderson/6b8be018f1ca45a6c22a to your computer and use it in GitHub Desktop.
>>> f = MyForm({'data': 3})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "django/forms/forms.py", line 84, in __init__
self.label_suffix = label_suffix if label_suffix is not None else _(':')
File "django/utils/translation/__init__.py", line 84, in ugettext
return _trans.ugettext(message)
File "django/utils/translation/__init__.py", line 56, in __getattr__
if settings.USE_I18N:
File "django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "django/conf/__init__.py", line 42, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment