예제 #1
0
    def query(match, value):
        if not value:
            return

        try:
            parameters = urlparse.parse_qsl(value, strict_parsing=True)
        except ValueError:
            return

        for key, value in parameters:
            match.setdefault(key, value)
예제 #2
0
    def query(match, value):
        if not value:
            return

        try:
            parameters = urlparse.parse_qsl(value, strict_parsing=True)
        except ValueError:
            return

        for key, value in parameters:
            match.setdefault(key, value)
예제 #3
0
    def fill_query(guid, query):
        # Parse query parameters
        parameters = dict(urlparse.parse_qsl(query))

        # Update `guid` with parameters
        guid.language = parameters.get('lang')
예제 #4
0
    def fill_query(guid, query):
        # Parse query parameters
        parameters = dict(urlparse.parse_qsl(query))

        # Update `guid` with parameters
        guid.language = parameters.get('lang')