Exception Type: TypeError at /robots.txt
Exception Value: 'str' object is not callable
What gives?
Views:
ROBOTS_PATH = os.path.join(CURRENT_PATH, 'robots.txt')
def robots(request):
""" view for robots.txt file """
return HttpResponse(open(ROBOTS_PATH).read(), 'text/plain')
Settings:
CURRENT_PATH = os.path.abspath(os.path.dirname(__file__).decode('utf-8'))
URLs:
(r'^robots\.txt$', 'robots'),