Here is what we have in our url conf:
from django.views.generic import TemplateView
.....
url(r'^robots\.txt$', TemplateView.as_view(template_name='robots.html')),
For some reason, we're getting redirected to ?next=robots.txt when attempting to hit *.com/robots.txt
Is there something obvious we're missing ? This seems to work locally in vagrant environments but it's not working in production (redirecting through ?next=)
update 1 There is no obvious reason that this would be behind a @login_required decorator or any required login function...
update 2 Sure enough, you can see robots.txt when you are authenticated....
update 3 direct_to_template has been deprecated, I'm sure that used to work but apparently has been deprecated in django 1.5
update 4 seems like this post has a way to force login_required for a TemplateView.as_view: How to require login for Django Generic Views? but it seems in our case this is being force by default ?