You can serve your static html file using your web server:
I personnaly use (for special cases) this to serve protected files or pictures using nginx or cherokee ,here is an exemple:
@login_required(redirect_field_name=None)
def serve_file(request,id):
'''
Where "id" is the argument that identifies
the ressource to be protected
'''
#allowed = True
# You can do your permission things here, and set allowed to True if applicable
##if allowed:
response = HttpResponse()
# construct the file's path
url=os.path.join (settings.MEDIA_ROOT,'files','page_'+id+'.html')
# test if path is ok and file exists
if os.path.isfile(url):
# let nginx determine the correct content type in this case
response['Content-Type']=""
response['X-Accel-Redirect'] = url
#response['X-Sendfile'] = url
# other webservers may accept X-Sendfile and not X-Accel-Redirect
return response
return HttpResponseForbidden()
This solution can work with any file type,
Removing the @login_required removes the protection ;)
!! Be carfull to ensure the type check of 'id' variable by regex in urls.py