Re: error in file reading after deploy with mod_wsgi

2010-01-30 Thread cootetom
'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

error in file reading after deploy with mod_wsgi

2010-01-30 Thread ts
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