#NEWLINE# @ register . tag ( ) #NEWLINE# def suggested( parser , token ) : #NEWLINE# #INDENT# '\n    Returns a list of Recommendation (suggestions of objects) for the current user.\n\n    Usage:\n\n    ::\n\n        {% suggested as suggestions [limit 5]  %}\n        {% for suggested in suggestions %}\n            {{ suggested.object }}\n        {% endfor %}\n    ' #NEWLINE# bits = token . contents . split ( ) #NEWLINE# varname = bits [ 2 ] #NEWLINE# try : #NEWLINE# #INDENT# limit = int ( bits [ 4 ] ) #NEWLINE# #UNINDENT# except IndexError : #NEWLINE# #INDENT# limit = 5 #NEWLINE# #UNINDENT# return SuggestionNode ( varname , limit )