Issue #12 resolved

Installation fails with Django 1.5 alpha 1

Max Arnold
created an issue

With Django 1.5 (first alpha release) running python fails with the following exception:

Traceback (most recent call last):
  File "", line 2, in <module>
    from timedelta import __version__
  File "/Users/lwarx/play/beefarm/django-timedeltafield-0.6.7/timedelta/", line 6, in <module>
    from fields import TimedeltaField
  File "/Users/lwarx/play/beefarm/django-timedeltafield-0.6.7/timedelta/", line 1, in <module>
    from django.db import models
  File "/Users/lwarx/.virtualenvs/beefarm/lib/python2.7/site-packages/django/db/", line 11, in <module>
    if DEFAULT_DB_ALIAS not in settings.DATABASES:
  File "/Users/lwarx/.virtualenvs/beefarm/lib/python2.7/site-packages/django/conf/", line 51, in __getattr__
  File "/Users/lwarx/.virtualenvs/beefarm/lib/python2.7/site-packages/django/conf/", line 44, in _setup
django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Maybe this is a Django issue, but it looks like there are some unnecessary imports in which trigger django settings validation.

This affects automatic installation via pip/virtualenv.

Comments (7)

  1. Log in to comment