summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-08-16 04:51:21 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-08-16 04:51:21 +0000
commiteab705f6234e035b676fb02a70a9a3812d23351d (patch)
treeb208d666ef12818eac24bf44c349746c8f610f76
parent7299b397527c8774824f28db28a95803f1895583 (diff)
Fixed #6935: Modified inspectdb to provide better handling for table names with spaces. Thanks to adamv for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management/commands/inspectdb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/commands/inspectdb.py b/django/core/management/commands/inspectdb.py
index d7d17fd0f3..d0c298366a 100644
--- a/django/core/management/commands/inspectdb.py
+++ b/django/core/management/commands/inspectdb.py
@@ -16,7 +16,7 @@ class Command(NoArgsCommand):
from django.db import connection
import keyword
- table2model = lambda table_name: table_name.title().replace('_', '')
+ table2model = lambda table_name: table_name.title().replace('_', '').replace(' ', '')
cursor = connection.cursor()
yield "# This is an auto-generated Django model module."