#NEWLINE# def inclusion_tag( self , filename , func = None , takes_context = None , name = None ) : #NEWLINE# #INDENT# "\n        Register a callable as an inclusion tag:\n\n        @register.inclusion_tag('results.html')\n        def show_results(poll):\n            choices = poll.choice_set.all()\n            return {'choices': choices}\n        " #NEWLINE# def dec( func ) : #NEWLINE# #INDENT# ( params , varargs , varkw , defaults ) = getargspec ( func ) #NEWLINE# function_name = ( name or getattr ( func , '_decorated_function' , func ) . __name__ ) #NEWLINE# @ functools . wraps ( func ) #NEWLINE# def compile_func( parser , token ) : #NEWLINE# #INDENT# bits = token . split_contents ( ) [ 1 : ] #NEWLINE# ( args , kwargs ) = parse_bits ( parser , bits , params , varargs , varkw , defaults , takes_context , function_name ) #NEWLINE# return InclusionNode ( func , takes_context , args , kwargs , filename ) #NEWLINE# #UNINDENT# self . tag ( function_name , compile_func ) #NEWLINE# return func #NEWLINE# #UNINDENT# return dec