Ejemplo n.º 1
0
Archivo: http.py Proyecto: fmezas/spyne
    def as_werkzeug_rules(self):
        from werkzeug.routing import Rule
        from spyne.util.invregexp import invregexp

        methods = None
        if self.verb is not None:
            methods = invregexp(self.verb)

        host = self.host
        if host is None:
            host = '<__ignored>'  # this is necessary when host_matching is enabled.

        for a in invregexp(self.address):
            yield Rule(a, host=host, endpoint=self.endpoint, methods=methods)
Ejemplo n.º 2
0
    def as_werkzeug_rules(self):
        from werkzeug.routing import Rule
        from spyne.util.invregexp import invregexp

        methods = None
        if self.verb is not None:
            methods = invregexp(self.verb)

        host = self.host
        if host is None:
            host = '<__ignored>'  # this is necessary when host_matching is enabled.

        for a in invregexp(self.address):
            yield Rule(a, host=host, endpoint=self.endpoint, methods=methods)
Ejemplo n.º 3
0
    def as_werkzeug_rule(self):
        from werkzeug.routing import Rule
        from spyne.util.invregexp import invregexp

        methods = None
        if self.verb is not None:
            methods = invregexp(self.verb)

        return Rule(self.address, host=self.host, endpoint=self.endpoint,
                                                                methods=methods)
Ejemplo n.º 4
0
    def as_werkzeug_rule(self):
        from werkzeug.routing import Rule
        from spyne.util.invregexp import invregexp

        methods = None
        if self.verb is not None:
            methods = invregexp(self.verb)

        host = self.host
        if host is None:
            host = '<__ignored>'  # for some reason, this is necessary when
                                  # host_matching is enabled.

        return Rule(self.address, host=host, endpoint=self.endpoint.name,
                                                                methods=methods)
Ejemplo n.º 5
0
    def as_werkzeug_rule(self):
        from werkzeug.routing import Rule
        from spyne.util.invregexp import invregexp

        methods = None
        if self.verb is not None:
            methods = invregexp(self.verb)

        host = self.host
        if host is None:
            host = '<__ignored>'  # for some reason, this is necessary when
                                  # host_matching is enabled.

        return Rule(self.address, host=host, endpoint=self.endpoint.name,
                                                                methods=methods)