Search code examples
djangodjango-nonrel

ImportError: cannot import name timezone


After installing django-norel, and running python manage.py shell, I get this error:

>>> from django.utils import timezone
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: cannot import name timezone

using Ubuntu 12.04 LTS, python 2.7.3, django 1.4, and last versions of django-nonrel, djangotoolbox and django-mongodb engine

It seems to be some kind of incompatibility problem. Should I use an earlier version of django? If so, how can I specify the django version on the install command?


Solution

  • You can't have both "Django 1.4" and "the latest version of django-nonrel". Django-nonrel replaces Django, and the latest version is built on Django 1.3, which doesn't have the utils.timezone module.