def mindtouch_file_redirect(request, file_id, filename):
 attachment = get_object_or_404(Attachment, mindtouch_attachment_id=file_id)
 return redirect(attachment.get_file_url(), permanent=True)

def mindtouch_file_redirect ( request , file_id , filename ) : attachment = get_object_or_404 ( Attachment , mindtouch_attachment_id = file_id ) return redirect ( attachment . get_file_url ( ) , permanent = True )
redirect an old mindtouch file url to a new kuma file url .