From 8ec8a8720e8091fece3d28155d5e02ce3c148771 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 23 Jan 2006 03:06:39 +0000 Subject: [PATCH] magic-removal: Unabstracted get_module_name() function, because it was only used once git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2112 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/options.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/django/db/models/options.py b/django/db/models/options.py index 424a4700dd..6b134a4590 100644 --- a/django/db/models/options.py +++ b/django/db/models/options.py @@ -6,9 +6,6 @@ from django.db.models.query import orderlist2sql from bisect import bisect import re -# Calculate the module_name by converting to lowercase -get_module_name = lambda class_name: class_name.lower() - # Calculate the verbose_name by converting from InitialCaps to "lowercase with spaces". get_verbose_name = lambda class_name: re.sub('([A-Z])', ' \\1', class_name).lower().strip() @@ -49,7 +46,7 @@ class Options: def contribute_to_class(self, cls, name): cls._meta = self self.object_name = cls.__name__ - self.module_name = get_module_name(self.object_name) + self.module_name = self.object_name.lower() # If the verbose_name wasn't given, use the class name, # converted from "InitialCaps" to "lowercase with spaces". self.verbose_name = get_verbose_name(self.object_name)