summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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."