From e5bf574678e7224bb7252e69adc0695a76e35c36 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 11 Aug 2006 15:32:35 +0000 Subject: [PATCH] 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 --- django/core/management.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/django/core/management.py b/django/core/management.py index 877895eb219..7cbd018115f 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."