I have a text file in the static folder in my project root.
I'd like to serve it so I've created:
@csrf_exempt
def display_text(request):
content =
return HttpResponse(content, content_type='text/plain; charset=utf8')
How do I set the path to the textfile, or how do I read it in to 'content', so that I can display it.