Returns template path, either from a shortcut built-in template
        name (`form_as_p`) or a template path (`my_sitegate/my_tpl.html`).

        Note that template path can include one `%s` placeholder. In that case
        it will be replaced with flow type (`signin` or `signup`).

def get_template_name(self, template_name):
        """Returns template path, either from a shortcut built-in template
        name (`form_as_p`) or a template path (`my_sitegate/my_tpl.html`).

        Note that template path can include one `%s` placeholder. In that case
        it will be replaced with flow type (`signin` or `signup`).

        """
        if template_name is None:
            # Build default template path.
            template_name = self.default_form_template
        if '.html' not in template_name:  # Shortcut, e.g.: .
            template_name = '%s%s.html' % ('sitegate/%s/', template_name)
        if '%s' in template_name:  # Fill in the flow type placeholder.
            template_name = template_name % self.flow_type
        return template_name