I finally get it. I had to add '/' to ^ robots.txt $
(r'^robots\.txt/$', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')),
This is elementary! I assumed that by default APPEND_SLASH is true, however on a production server this did not work.
Let me know if anyone can provide some information about this.
source share