(parser, token)
return DocCommentNode(nodelist=nodelist, comment_type='doc',
                        wrap_blocks=wrap_blocks)
A block tag for documentation comments.

  Example usage:
    {% doc_comment noblock %}
    With the noblock parameter, line returns will be considered hard returns
    and kept in the output, although long lines will be wrapped.

    Without noblock, contiguous non-empty lines will be wrapped together as
    paragraphs.
    {% enddoc_comment %}

  Args:
    parser: (Parser): A django template parser.
    token: (str): Token passed into the parser.
  Returns:
    (DocCommentNode) A template node.
A block tag for documentation comments.
A block tag for documentation comments .
def DoDocComment(parser, token):
  """A block tag for documentation comments.

  Example usage:
    {% doc_comment noblock %}
    With the noblock parameter, line returns will be considered hard returns
    and kept in the output, although long lines will be wrapped.

    Without noblock, contiguous non-empty lines will be wrapped together as
    paragraphs.
    {% enddoc_comment %}

  Args:
    parser: (Parser): A django template parser.
    token: (str): Token passed into the parser.
  Returns:
    (DocCommentNode) A template node.
  """
  args = token.split_contents()
  if len(args) > 2:
    raise django_template.TemplateSyntaxError(
        'doc_comment expects at most one argument')
  if len(args) == 2:
    wraparg = args[1]
    if wraparg not in ('block', 'noblock'):
      raise django_template.TemplateSyntaxError(
          'argument to doc_comment (wrap_blocks) '
          'must be either "block" (the default) or "noblock"')
    wrap_blocks = wraparg == 'block'
  else:
    wrap_blocks = True

  nodelist = parser.parse(('enddoc_comment',))
  parser.delete_first_token()
  return DocCommentNode(nodelist=nodelist, comment_type='doc',
                        wrap_blocks=wrap_blocks)
def DoDocComment ( parser , token ) : args = token . split_contents ( ) if len ( args ) > 2 : raise django_template . TemplateSyntaxError ( 'doc_comment expects at most one argument' ) if len ( args ) == 2 : wraparg = args [ 1 ] if wraparg not in ( 'block' , 'noblock' ) : raise django_template . TemplateSyntaxError ( 'argument to doc_comment (wrap_blocks) ' 'must be either "block" (the default) or "noblock"' ) wrap_blocks = wraparg == 'block' else : wrap_blocks = True nodelist = parser . parse ( ( 'enddoc_comment' , ) ) parser . delete_first_token ( ) return DocCommentNode ( nodelist = nodelist , comment_type = 'doc' , wrap_blocks = wrap_blocks )