1👍
You can’t do this, it makes no sense. Only a view can return a response, including a redirect.
A template tag is not the appropriate place to process a form. You should get the form to post to a different URL and do the processing in that view.
Source:stackexchange.com