<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> import defaults <EOL> from django . conf import settings <EOL> from djmako import MakoLoader as loader <EOL> from djmako . loader import MakoExceptionWrapper <EOL> from shortcuts import * <EOL> import inspect <EOL> import logging <EOL> import os <EOL> from django . conf import settings <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> try : <EOL> from django . utils import importlib <EOL> except ImportError : <EOL> import importlib <EOL> __all__ = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> for setting in dir ( defaults ) : <EOL> if setting == setting . upper ( ) and not hasattr ( settings , setting ) : <EOL> setattr ( settings , setting , getattr ( defaults , setting ) ) <EOL> settings . TEMPLATE_LOADERS = ( '<STR_LIT>' , ) + settings . TEMPLATE_LOADERS <EOL> if '<STR_LIT>' not in settings . MAKO_TEMPLATE_OPTS : <EOL> from nemo . parser import nemo <EOL> settings . MAKO_TEMPLATE_OPTS [ '<STR_LIT>' ] = nemo <EOL> log = logging . getLogger ( '<STR_LIT>' ) <EOL> stream = logging . StreamHandler ( ) <EOL> stream . setLevel ( logging . INFO ) <EOL> log . addHandler ( stream ) <EOL> def autodiscover ( ) : <EOL> """<STR_LIT>""" <EOL> from django . conf import settings <EOL> for app in settings . INSTALLED_APPS : <EOL> try : <EOL> app_path = importlib . import_module ( app ) . __path__ <EOL> except AttributeError : <EOL> continue <EOL> template_directory = os . path . join ( app_path [ <NUM_LIT:0> ] , '<STR_LIT>' ) <EOL> special_file = os . path . join ( template_directory , '<STR_LIT>' ) <EOL> settings . MAKO_TEMPLATE_DIRS = list ( settings . MAKO_TEMPLATE_DIRS ) <EOL> if os . path . exists ( special_file ) : <EOL> settings . MAKO_TEMPLATE_DIRS . append ( template_directory ) </s>
