Exemple #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)
    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)
Exemple #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')
    def fill_query(guid, query):
        # Parse query parameters
        parameters = dict(urlparse.parse_qsl(query))

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