[Answer]-In Django, is it possible to access the current user session from context of parent template within a inclusion tag?

1👍

You are overwriting the whole context in render_attachments() you must return

def render_attachments(context):
    # some code...
    context['attachments'] = session.get('attachments', [])
    return context

Same goes for attachment_delete_link().

👤McAbra

Leave a comment