(field, registry=None)
return "\n".join(parts)
Common metadata includes verbose_name and help_text.

    http://docs.mongoengine.org/apireference.html#fields
Common metadata includes verbose_name and help_text.
Common metadata includes verbose_name and help_text .
def get_field_description(field, registry=None):
    """
    Common metadata includes verbose_name and help_text.

    http://docs.mongoengine.org/apireference.html#fields
    """
    parts = []
    if hasattr(field, "document_type"):
        doc = trim_docstring(field.document_type.__doc__)
        if doc:
            parts.append(doc)
    if hasattr(field, "verbose_name"):
        parts.append(field.verbose_name.title())
    if hasattr(field, "help_text"):
        parts.append(field.help_text)
    if field.db_field != field.name:
        name_format = "(%s)" if parts else "%s"
        parts.append(name_format % field.db_field)

    return "\n".join(parts)
def get_field_description ( field , registry = None ) : parts = [ ] if hasattr ( field , "document_type" ) : doc = trim_docstring ( field . document_type . __doc__ ) if doc : parts . append ( doc ) if hasattr ( field , "verbose_name" ) : parts . append ( field . verbose_name . title ( ) ) if hasattr ( field , "help_text" ) : parts . append ( field . help_text ) if field . db_field != field . name : name_format = "(%s)" if parts else "%s" parts . append ( name_format % field . db_field ) return "\n" . join ( parts )