#NEWLINE# def indentby( parser , token ) : #NEWLINE# #INDENT# '\n    Adds indentation to text between the tags by the given indentation level.\n\n    {% indentby <indent_level> [if <statement>] %}\n    ...\n    {% endindentby %}\n\n    Arguments:\n      indent_level - Number of spaces to indent text with.\n      statement - Only apply indent_level if the boolean statement evalutates to True.\n    ' #NEWLINE# args = token . split_contents ( ) #NEWLINE# largs = len ( args ) #NEWLINE# if ( largs not in ( 2 , 4 ) ) : #NEWLINE# #INDENT# raise template . TemplateSyntaxError ( '%r tag requires 1 or 3 arguments' ) #NEWLINE# #UNINDENT# indent_level = args [ 1 ] #NEWLINE# if_statement = None #NEWLINE# if ( largs == 4 ) : #NEWLINE# #INDENT# if_statement = args [ 3 ] #NEWLINE# #UNINDENT# nodelist = parser . parse ( ( 'endindentby' , ) ) #NEWLINE# parser . delete_first_token ( ) #NEWLINE# return IndentByNode ( token , indent_level , if_statement )