EDIT:
A good article about Using Django for (mostly) static sites
ORIGINAL:
You mentioned Django in your question, so I'm going to follow that line of interest. Not that there aren't other frameworks out there that can surely do a good job, but as has been commented, without more details about your particular use case, it's hard to be very constructive.
Without any framework, means working directly with WSGI. And that means manually specifying HTTP headers, and all that jazz... I'd take a look at a framework after all. http://wsgi.readthedocs.org/en/latest/frameworks.html
Django is by no means dependent on a database. Sure, it has a lot of built-in goodies that make it easy to work with database(s) but it sure is not necessary.
Just remove any apps from INSTALLED_APPS
, and remove url(r'^admin/'...
from urls.py. That's it, now you can create your views and (optionaly) templates, unhindered by database :)
Note: not all apps require a database, eg. django.contrib.staticfiles.
A simple view (taken from The Docs):
from django.http import HttpResponse
import datetime
def current_datetime(request):
now = datetime.datetime.now()
html = "<html><body>It is now %s.</body></html>" % now
return HttpResponse(html)
This line in urls.py will link a URL to it:
url(r'^$', 'testapp.views.current_datetime'), # on domain root
or
url(r'^da-time/?$', 'testapp.views.current_datetime'), # on domain.com/da-time/
You can use python manage.py runserver
to run a test server.
True, you're not using the ORM, what's IMHO the best part of Django, but still, I'd argue that it might be worth it, especially if you are familiar with it, or plan to be. And, you're not writing response_headers = [('Content-type', 'text/plain')]
either, which is probably a good thing. Though, of course, manually specifying headers, redirect, and such is just one or two lines of code away.