@register.inclusion_tag("<STR_LIT>", takes_context=True)<EOL>def stored_messages_list(context, num_elements=<NUM_LIT:10>):
if "<STR_LIT:user>" in context:<EOL><INDENT>user = context["<STR_LIT:user>"]<EOL>if user.is_authenticated():<EOL><INDENT>qs = Inbox.objects.select_related("<STR_LIT:message>").filter(user=user)<EOL>return {<EOL>"<STR_LIT>": qs[:num_elements],<EOL>"<STR_LIT:count>": qs.count(),<EOL>}<EOL><DEDENT><DEDENT>
Renders a list of unread stored messages for the current user