'Import and invoke the template config (new module pattern). Allows
to specify multiple templates like:
settings.template = ("default", "locations.US")
Configurations will be imported and executed in order of appearance
@param config: name of the config-module
@todo: remove fallback when migration complete (+giving some
time for downstream projects to adapt)'

def import_template(self, config='config'):

    names = self.get_template()
    if (not isinstance(names, (list, tuple))):
        names = [names]
    for name in names:
        package = ('templates.%s' % name)
        self.check_debug()
        template = None
        try:
            template = getattr(__import__(package, fromlist=[config]), config)
        except ImportError:
            if (len(names) > 1):
                raise SyntaxError('Cascading    templates    not    supported    for    script    pattern')
            self.execute_template(name)
            break
        else:
            template.config(self)
    return self
