Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 0b71ffa commit e5bf574678e7224bb7252e69adc0695a76e35c36 @adrianholovaty adrianholovaty committed
Showing with 1 addition and 3 deletions.
  1. +1 −3 django/core/
4 django/core/
@@ -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."

0 comments on commit e5bf574

Please sign in to comment.
Something went wrong with that request. Please try again.