You can put variable names in your views.py functions. For example:
@app.route('post/<variable>', methods=['GET'])
def daily_post(variable):
return render_template("template.html",para1=meter1, para2=meter2)
To get information about your database for display on your site, you will want to pass parameters to the template. So, in your template you will refer to such parameters as:
<td>Post Author: {{ para1.author }}</td>
<td>Post Body: {{ para1.body }}</td>
<td>Date Posted: [{{ para2 }}] times</td>
, mysite.com/post/anything_here, "anything_here" . , 404 , - :
@app.errorhandler(404)
def not_found_error(error):
return render_template('404.html', pic=pic), 404