Kaydet (Commit) e5bf5746 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Changed inspectdb to *not* trim trailing 's' from database table name to create…

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
üst 0b71ffac
......@@ -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."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment