Skip to content

Commit

Permalink
Fixed #7387 - Fixed circular import problem when importing `contrib.c…
Browse files Browse the repository at this point in the history
…ontenttypes.generic` module.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
gdub committed Jun 15, 2008
1 parent d1b5902 commit 0b8fafc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions django/db/models/sql/subqueries.py
Expand Up @@ -2,10 +2,9 @@
Query subclasses which provide extra functionality beyond simple data retrieval. Query subclasses which provide extra functionality beyond simple data retrieval.
""" """


from django.contrib.contenttypes import generic
from django.core.exceptions import FieldError from django.core.exceptions import FieldError
from django.db.models.sql.constants import * from django.db.models.sql.constants import *
from django.db.models.sql.datastructures import RawValue, Date from django.db.models.sql.datastructures import Date
from django.db.models.sql.query import Query from django.db.models.sql.query import Query
from django.db.models.sql.where import AND from django.db.models.sql.where import AND


Expand Down Expand Up @@ -43,6 +42,7 @@ def delete_batch_related(self, pk_list):
More than one physical query may be executed if there are a More than one physical query may be executed if there are a
lot of values in pk_list. lot of values in pk_list.
""" """
from django.contrib.contenttypes import generic
cls = self.model cls = self.model
for related in cls._meta.get_all_related_many_to_many_objects(): for related in cls._meta.get_all_related_many_to_many_objects():
if not isinstance(related.field, generic.GenericRelation): if not isinstance(related.field, generic.GenericRelation):
Expand Down Expand Up @@ -382,4 +382,3 @@ def get_from_clause(self):


def get_ordering(self): def get_ordering(self):
return () return ()

0 comments on commit 0b8fafc

Please sign in to comment.