<s> """<STR_LIT>""" <EOL> from django . conf import settings <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> try : <EOL> from django . template . base import linebreak_iter <EOL> except ImportError : <EOL> from django . views . debug import linebreak_iter <EOL> try : <EOL> from django . template . engine import Engine <EOL> except ImportError : <EOL> Engine = None <EOL> from django . template . context import get_standard_processors <EOL> from django . template . loader import find_template_loader <EOL> def get_template_dirs ( ) : <EOL> """<STR_LIT>""" <EOL> if Engine : <EOL> try : <EOL> engine = Engine . get_default ( ) <EOL> except ImproperlyConfigured : <EOL> template_dirs = [ ] <EOL> else : <EOL> template_dirs = engine . dirs <EOL> else : <EOL> template_dirs = settings . TEMPLATE_DIRS <EOL> return template_dirs <EOL> def get_template_loaders ( ) : <EOL> """<STR_LIT>""" <EOL> if Engine : <EOL> try : <EOL> engine = Engine . get_default ( ) <EOL> except ImproperlyConfigured : <EOL> loaders = [ ] <EOL> else : <EOL> loaders = engine . template_loaders <EOL> else : <EOL> loaders = [ <EOL> find_template_loader ( loader_name ) <EOL> for loader_name in settings . TEMPLATE_LOADERS ] <EOL> return loaders <EOL> def get_template_context_processors ( ) : <EOL> """<STR_LIT>""" <EOL> if Engine : <EOL> try : <EOL> engine = Engine . get_default ( ) <EOL> except ImproperlyConfigured : <EOL> context_processors = [ ] <EOL> else : <EOL> context_processors = engine . template_context_processors <EOL> else : <EOL> context_processors = get_standard_processors ( ) <EOL> return context_processors </s>
