Exemple #1
0
def add_signup() -> str:
    if lg.get_status() == lg.Status.CLOSED:
        return signup()
    form = SignUpForm(request.form, auth.person_id(), auth.mtgo_username())
    if form.validate():
        d = lg.signup(form)
        response = make_response(redirect(url_for('deck', deck_id=d.id)))
        response.set_cookie('deck_id', str(d.id))
        return response
    return signup(form)
Exemple #2
0
def edit_league() -> str:
    view = EditLeague(lg.get_status())
    return view.page()
Exemple #3
0
def signup(form: Optional[SignUpForm] = None) -> str:
    if form is None:
        form = SignUpForm(request.form, auth.person_id(), auth.mtgo_username())
    view = SignUp(form, lg.get_status() == lg.Status.CLOSED, auth.person_id())
    return view.page()