Skip to content

Instantly share code, notes, and snippets.

@eriktaubeneck
Created September 11, 2014 20:23
Show Gist options
  • Save eriktaubeneck/d492d2c6d1f9d331bcdf to your computer and use it in GitHub Desktop.
Save eriktaubeneck/d492d2c6d1f9d331bcdf to your computer and use it in GitHub Desktop.
flask signup id example
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'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment