def file_link(self, obj):
        url_name = '%s:%s_email_attachment' % (self.admin_site.name, self.model._meta.app_label,)
        kwargs={
            'email_id': str(obj.email_id),
            'attachment_id': str(obj.id),
            'filename': str(obj.filename)}
        url = reverse(url_name, kwargs=kwargs)
        return u'<a href="%(url)s">%(filename)s</a>' % {'filename': obj.filename, 'url': url}
dataset/ETHPy150Open stefanfoulis/django-database-email-backend/database_email_backend/admin.py/AttachmentInlineAdmin.file_link/original