diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-09-26 05:03:40 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-09-26 05:03:40 +0000 |
| commit | 60bb739d9ef6a94cb83d769c4696ea9838f2dbcb (patch) | |
| tree | 205dc4853256030e0a23e3319d50c203e26b75c1 | |
| parent | fa8662a13f0826a2f7eb4fb727307ad45c3e0175 (diff) | |
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
| -rw-r--r-- | django/core/meta/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
