I get this error when i try to pass the UUID attribute to url parameter.
urlpatterns = [
url(r\'^historia-clinica/(?P[W\\d\\-]+)/$\', ClinicH
For using the UUID in a URL like that, you should pass it as a string:
return redirect(reverse('namespace:name', kwargs={'uuid' : str(object.id)}))
FYI - it looks like WIMs answer is a bit more thorough. Your regex should certainly be tightened up. If you end up using the string representation of the slug, you'll want a regex like this: [A-Za-z0-9\-]+ which allows for alphanumerics and hyphens.