id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 7387,Recursive imports in django.contrib.contenttypes.generic,oliver@…,nobody,"I'm trying to import `django.contrib.contenttypes.generic` in a script of mine, which causes a recursive import in Django:- {{{ >>> from django.contrib.contenttypes import generic Traceback (most recent call last): File """", line 1, in File ""/Library/Python/2.5/site-packages/django/contrib/contenttypes/generic.py"", line 8, in from django.db.models import signals File ""/Library/Python/2.5/site-packages/django/db/models/__init__.py"", line 6, in from django.db.models.query import Q File ""/Library/Python/2.5/site-packages/django/db/models/query.py"", line 7, in from django.db.models import signals, sql File ""/Library/Python/2.5/site-packages/django/db/models/sql/__init__.py"", line 2, in from subqueries import * File ""/Library/Python/2.5/site-packages/django/db/models/sql/subqueries.py"", line 5, in from django.contrib.contenttypes import generic ImportError: cannot import name generic }}} However, if I try this in Django's shell (as in through `manage.py shell` this seems to work fine for some reason. However, in a standard Python shell when I've run `setup_environ` it doesn't, and I see this error. It's important for me to be able to use it in the standard Python shell as this was highlighted to me by a script I'm trying to write). ",,closed,Contrib apps,dev,,fixed,import importerror recursive contenttypes,,Accepted,0,0,0,0,0,0