예제 #1
0
def view_rickroll_success(link):
    """
        Get a page that shows how many people fell for your rickroll.
    """
    shortcut = db.find_link(link)

    if shortcut is None:
        return redirect(url_for('index'))
    else:
        return render_template('success.html',
                               amount=shortcut[1],
                               link=link,
                               domain=DOMAIN_NAME)
예제 #2
0
def get_rickrolled(link):
    """
        Gain the page that shows the fake rich preview.
    """
    if link == 'favicon.ico':
        abort(404)

    shortcut = db.find_link(link)

    if shortcut is None:
        return redirect(url_for('index'))
    else:
        return render_template('roll.html',
                               title=shortcut[2],
                               description=shortcut[3],
                               image=shortcut[4],
                               link=link,
                               domain=DOMAIN_NAME)