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
This commit is contained in:
parent
67e6252a1e
commit
8254a7a7db
|
@ -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().
|
||||
|
|
Loading…
Reference in New Issue