summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-08-11 15:32:35 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-08-11 15:32:35 +0000
commite5bf574678e7224bb7252e69adc0695a76e35c36 (patch)
tree61a306995e218f1e0bcb74ba1ce178fbfdddf94b
parent0b71ffacab025e82f58dfe40d4d8d22540f67471 (diff)
Changed inspectdb to *not* trim trailing 's' from database table name to create class name, because Django no longer does that as of magic-removal
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3558 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/core/management.py b/django/core/management.py
index 877895eb21..7cbd018115 100644
--- a/django/core/management.py
+++ b/django/core/management.py
@@ -698,9 +698,7 @@ def inspectdb():
introspection_module = get_introspection_module()
- def table2model(table_name):
- object_name = table_name.title().replace('_', '')
- return object_name.endswith('s') and object_name[:-1] or object_name
+ table2model = lambda table_name: table_name.title().replace('_', '')
cursor = connection.cursor()
yield "# This is an auto-generated Django model module."