quoteid direct homepath: /?1 should now work
This commit is contained in:
5
app.py
5
app.py
@@ -141,6 +141,11 @@ def random_quote():
|
|||||||
|
|
||||||
return render_template('random.html', quote=random_quote)
|
return render_template('random.html', quote=random_quote)
|
||||||
|
|
||||||
|
@app.route('/?<int:id>')
|
||||||
|
def quote_homepathid(quote_id):
|
||||||
|
quote = Quote.query.get_or_404(quote_id)
|
||||||
|
return render_template('quote.html', quote=quote)
|
||||||
|
|
||||||
@app.route('/quote')
|
@app.route('/quote')
|
||||||
def quote():
|
def quote():
|
||||||
quote_id = request.args.get('id')
|
quote_id = request.args.get('id')
|
||||||
|
|||||||
Reference in New Issue
Block a user