Add a path template and handler.

        :param name: Optional. If specified, allows reverse path lookup with
            :meth:`reverse`.
        :param template: A string or :class:`~potpy.template.Template`
            instance used to match paths against. Strings will be wrapped in a
            Template instance.
        :param handler: A callable or :class:`~potpy.router.Route` instance
            which will handle calls for the given path. See
            :meth:`potpy.router.Router.add` for details.

def add(self, *args):
        """Add a path template and handler.

        :param name: Optional. If specified, allows reverse path lookup with
            :meth:`reverse`.
        :param template: A string or :class:`~potpy.template.Template`
            instance used to match paths against. Strings will be wrapped in a
            Template instance.
        :param handler: A callable or :class:`~potpy.router.Route` instance
            which will handle calls for the given path. See
            :meth:`potpy.router.Router.add` for details.
        """
        if len(args) > 2:
            name, template = args[:2]
            args = args[2:]
        else:
            name = None
            template = args[0]
            args = args[1:]
        if isinstance(template, tuple):
            template, type_converters = template
            template = Template(template, **type_converters)
        elif not isinstance(template, Template):
            template = Template(template)
        if name:
            self._templates[name] = template
        super(PathRouter, self).add(template, *args)