コード例 #1
0
def show_form():
    """Show Form for User Input"""

    story_title = request.args["madlib"]
    for story in stories.values():
        if story.title == story_title:
            story_for_form = story
    
    return render_template('form.html', s=story_for_form, story_title=story_title)
コード例 #2
0
ファイル: app.py プロジェクト: bluesh322/Mad-Libs
def form():
    story_id = request.args["story_id"]
    story = stories[story_id]
    prompts = story.prompts
    return render_template('form.html',
                           prompts=prompts,
                           title=story.title,
                           story_id=story_id,
                           stories=stories.values())
コード例 #3
0
ファイル: app.py プロジェクト: bluesh322/Mad-Libs
def show_madlib():
    story_id = request.args["story_id"]
    story = stories[story_id]

    madlib_text = story.generate(request.args)
    return render_template('madlib.html',
                           madlib_text=madlib_text,
                           title=story.title,
                           story_id=story_id,
                           stories=stories.values())
コード例 #4
0
def show_story():
    """Display Madlib Story"""

    answers = request.args
    story_title = request.args["story_title"]
    for story in stories.values():
        if story.title == story_title:
            story_to_gen = story
            
    return render_template("story.html", story_to_gen=story_to_gen, user_answers=answers)
コード例 #5
0
ファイル: app.py プロジェクト: theUyonator/Flask_Madlibs_
def list_of_stories():
    """This function shows the lists of stories"""
    return render_template("list_of_stories.html", stories=stories.values())
コード例 #6
0
def home_page():
    return render_template('select-story.html', stories=stories.values())
コード例 #7
0
ファイル: app.py プロジェクト: r-pears/Jinja_Exercise
def home():
    """Home page where you chose story."""
    return render_template("home.html", stories=stories.values())
コード例 #8
0
def ask_story():
    """Show list of stories form"""

    return render_template("select-story.html", stories=stories.values())
コード例 #9
0
def ask_story():
    """Show list-of-stories form."""

    return render_template("index.html", stories=stories.values())
コード例 #10
0
def index():
    """List of stories form"""

    return render_template("index.html", stories=stories.values())
コード例 #11
0
def ask_story():
    """Show list of stories options. """
    return render_template('select-story.html', stories=stories.values())
コード例 #12
0
ファイル: app.py プロジェクト: janderson77/19.2-jinja-madlibs
def showids():
    return render_template('selectstory.html', stories=stories.values())
コード例 #13
0
ファイル: app.py プロジェクト: bluesh322/Mad-Libs
def index():
    """Show list of stories"""
    return render_template('index.html', stories=stories.values())
コード例 #14
0
ファイル: app.py プロジェクト: SUBstylee/flask
def get_story():
    '''User picks a story'''
    return render_template('choice.html', stories=stories.values())
コード例 #15
0
def home_page():
    """Offer user choice of Madlib Games"""

    return render_template('index.html', stories=stories.values())
コード例 #16
0
def ask_story():
    """Show list-of-stories form."""
    all_posts = Madlib.query.order_by(Madlib.date_posted).all()
    return render_template("select-story.html",
                           stories=stories.values(),
                           all_posts=all_posts)