Use django's iri_to_uri function to convert next URL to a valid URI