Skip to content

Instantly share code, notes, and snippets.

@eipiminus1
eipiminus1 / description.md
Created September 26, 2017 21:14
Internal redirects in Flask

Internal redirects in Flask

Goal: Instead of redirecting a client to a new path, the request should be redirected internally. The response should be returned without changing the clients (browser) URL.

Simple internal redirect

The simplest way I found to achieve internal redirecting is by calling the app.full_dispatch_request with a modified context.

def internal_redirect(path):
@eipiminus1
eipiminus1 / designer.html
Last active August 29, 2015 14:24
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../smoothie-chart/smoothie-chart.html">