diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-10-15 00:54:42 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-10-15 00:54:42 +0000 |
| commit | 8254a7a7db483e3d252d7cc34f5d254e98cfa066 (patch) | |
| tree | cc1099c573e40bdc246c9549a393a0550aa76e47 | |
| parent | 67e6252a1ecd6587693b2756bf4bf27c0b89c3e6 (diff) | |
Fixed #628 -- Django no longer overwrites model class docstrings if they're provided
git-svn-id: http://code.djangoproject.com/svn/django/trunk@878 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/meta/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/meta/__init__.py b/django/core/meta/__init__.py index 0c6078705a..f934f9dd6c 100644 --- a/django/core/meta/__init__.py +++ b/django/core/meta/__init__.py @@ -563,7 +563,8 @@ class ModelBase(type): new_class = type.__new__(cls, name, bases, attrs) # Give the class a docstring -- its definition. - new_class.__doc__ = "%s.%s(%s)" % (opts.module_name, name, ", ".join([f.name for f in opts.fields])) + if new_class.__doc__ is None: + new_class.__doc__ = "%s.%s(%s)" % (opts.module_name, name, ", ".join([f.name for f in opts.fields])) # Create the standard, module-level API helper functions such # as get_object() and get_list(). |
