From 60bb739d9ef6a94cb83d769c4696ea9838f2dbcb Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 26 Sep 2005 05:03:40 +0000 Subject: [PATCH] Fixed #558 -- Subclassed models now use their own class name (or explicitly defined module_name) as the module_name, not the parent's module_name git-svn-id: http://code.djangoproject.com/svn/django/trunk@697 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/meta/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/meta/__init__.py b/django/core/meta/__init__.py index 751c5edfbb..8061394dde 100644 --- a/django/core/meta/__init__.py +++ b/django/core/meta/__init__.py @@ -430,7 +430,7 @@ class ModelBase(type): # Pass any Options overrides to the base's Options instance, and # simultaneously remove them from attrs. When this is done, attrs # will be a dictionary of custom methods, plus __module__. - meta_overrides = {'fields': fields} + meta_overrides = {'fields': fields, 'module_name': name.lower() + 's'} for k, v in meta_attrs.items(): if not callable(v) and k != '__module__': meta_overrides[k] = meta_attrs.pop(k)