__license__ = "Apache 2.0"
__copyright__ = "Copyright 2008 nb.io"
__author__ = "Randy Reddig - ydnar@nb.io"


from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponse, Http404
from django.template import loader
import os.path
import re


DEFAULT_CONTENT_TYPE = 'text/html'


def null():
    return


def auto(request, **kwargs):
    t = kwargs['template']
    if not t:
        raise Http404
    c = RequestContext(request)
    return HttpResponse(t.render(c), DEFAULT_CONTENT_TYPE)

@@ -393,16 +393,29 @@
 wargs):%0A
+    try:%0A    
     t = 
@@ -441,15 +441,13 @@
     
-if not 
+excep
 t:%0A 

correct 404 handling