Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Add @redirect_from decorator to handle redirects #523

Merged
merged 1 commit into from Feb 20, 2018

Conversation

tdooner
Copy link
Contributor

@tdooner tdooner commented Feb 20, 2018

This is a quick DRYing up of our various redirect methods. I googled
around for a better way to do this with flask but didn't find one.

This adds a decorator which dynamically creates these handler methods
and registers them as a route.

(note- eventually this should be extracted from the views.py file to somewhere else)

This is a quick DRYing up of our various redirect methods. I googled
around for a better way to do this with flask but didn't find one.

This adds a decorator which dynamically creates these handler methods
and registers them as a route.
Copy link
Contributor

@fritzjooste fritzjooste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, much tidier! 👍

@tdooner tdooner merged commit 42bf91a into codeforamerica:master Feb 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants