Fix empty file names messin stuff up.

rtd2
Eric Holscher 2010-08-14 06:11:22 -05:00
parent 5d8cd224f3
commit 2745423ce5
1 changed files with 3 additions and 1 deletions

View File

@ -20,10 +20,12 @@ def github_build(request):
update_docs.delay(slug=project.slug)
return HttpResponse('Build Started')
def serve_docs(request, username, project_slug, filename="index.html"):
def serve_docs(request, username, project_slug, filename):
proj = Project.objects.get(slug=project_slug, user__username=username)
project = proj.slug
path = get_project_path(proj)
if not filename:
filename = "index.html"
filename = filename.rstrip('/')
doc_base = os.path.join(path, project)