'With both `redirect_field_name` and `redirect_field_value` available in
the context, add on a querystring to handle "next" redirecting.'

def add_next(self, url, context):

    if all([(key in context) for key in [u'redirect_field_name', u'redirect_field_value']]):
        if context[u'redirect_field_value']:
            url += (u'?' + urlencode({context[u'redirect_field_name']: context[u'redirect_field_value']}))
    return url
