[PYTHON] Redirect with Pyramid

Redirect with Pyramid View.

@view_config(route_name="method")
def method(request):

@view_config(route_name="redirect")
def redirect(request):
  return HttpFound(location=request.route_url('method'))

Since a simple method call does not result in a redirect, use the HttpFound class as described above.

Recommended Posts

Redirect with Pyramid
Play with Pyramid
[Python] Redirect with CGIHTTPServer
Use sqlite load_extensions with Pyramid
pyramid
Introduced Pyramid
Linux redirect
[Web development with Python] query is also redirect