Skip to content

Instantly share code, notes, and snippets.

@eriktaubeneck
Created September 11, 2014 20:23
Show Gist options
  • Select an option

  • Save eriktaubeneck/d492d2c6d1f9d331bcdf to your computer and use it in GitHub Desktop.

Select an option

Save eriktaubeneck/d492d2c6d1f9d331bcdf to your computer and use it in GitHub Desktop.

Revisions

  1. eriktaubeneck created this gist Sep 11, 2014.
    14 changes: 14 additions & 0 deletions example.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    from flask import Flask, render_template, redirect, url_for

    app = Flask(__name__)

    @app.route('index')
    def index():
    return render_template('index.html')

    @app.route('signup/<signup_id>')
    def signup(signup_id=None):
    # other signup stuff, including creating a user
    user.signup_id = signup_id
    # save the user model depending on how it's stored
    return redirect(url_for('index'))