'public/index.html' is a relative URL. I think the problem is probably
because Apache is trying to open the directory from a place where is
doesn't exist. You can make it an absolute path from the executing
file by using the following code.
import os
os.path.join(os.path.dirname(__file__), 'publi
Hi,
in my views.py i have the following code:
from django.http import HttpResponse
def index(request):
fp = open('public/index.html')
html = fp.read()
fp.close()
return HttpResponse(html)
this works fine when i use "python manage.py runserver", and the page
serves up ok.
but wh
2 matches
Mail list logo