import os
import types
import re
+import logging
from django.template import Template, TemplateDoesNotExist
from django.conf import settings
for m in MODULE_LIST:
try:
all.append(__import__('%s.%s' % (m.__name__, script_name), globals(), locals(), [m.__name__]))
- except Exception, e:
- #print m.__name__ + ":" + str(e)
+ except ImportError, e:
+ #print repr(type(e)) + m.__name__ + ":" + str(e)
pass
+ except:
+ import traceback
+ logging.error("Error importing %s from module %s: \n %s" % (
+ script_name, m.__name__, traceback.format_exc()
+ ))
return all
raise TemplateDoesNotExist, name
module_templates_loader.is_usable = True
+
+from decorators import decorate