#!/usr/bin/env python from django.conf import settings from django.template import Context from django.template.loader import get_template settings.configure(TEMPLATE_DIRS=('/Applications/MAMP/cgi-bin/python',)) tmpl = get_template('template.html') print tmpl.render(Context({'message' : 'Django' }))