1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

boulder-oracle-sprint: Merged to [5173]

git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Boulder Sprinters
2007-05-08 17:46:05 +00:00
parent a275d3da8e
commit 7f13278f86
27 changed files with 271 additions and 81 deletions

View File

@@ -260,14 +260,14 @@ def _get_sql_for_pending_references(model, pending_references):
def _get_many_to_many_sql_for_model(model):
from django.db import backend, get_creation_module
from django.db.models import GenericRel
from django.contrib.contenttypes import generic
data_types = get_creation_module().DATA_TYPES
opts = model._meta
final_output = []
for f in opts.many_to_many:
if not isinstance(f.rel, GenericRel):
if not isinstance(f.rel, generic.GenericRel):
tablespace = f.db_tablespace or opts.db_tablespace
if tablespace and backend.supports_tablespaces and backend.autoindexes_primary_keys:
tablespace_sql = ' ' + backend.get_tablespace_sql(tablespace, inline=True)