- # Register the template path.
- pluginapi.register_template_path(os.path.join(PLUGIN_DIR, 'templates'))
+ routes = []
+ for name, (url, template) in pages:
+ name = 'flatpagesfile.%s' % name.strip()
+ controller = flatpage_handler_builder(template)
+ routes.append(
+ Route(name, url, controller=controller))