Django

Code

Changeset 878

Show
Ignore:
Timestamp:
10/14/05 19:54:42 (3 years ago)
Author:
adrian
Message:

Fixed #628 -- Django no longer overwrites model class docstrings if they're provided

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/meta/__init__.py

    r792 r878  
    564564 
    565565        # Give the class a docstring -- its definition. 
    566         new_class.__doc__ = "%s.%s(%s)" % (opts.module_name, name, ", ".join([f.name for f in opts.fields])) 
     566        if new_class.__doc__ is None: 
     567            new_class.__doc__ = "%s.%s(%s)" % (opts.module_name, name, ", ".join([f.name for f in opts.fields])) 
    567568 
    568569        # Create the standard, module-level API helper functions such