Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to return an html file in flask

from flask import Flask, render_template

app = Flask(__name__)
@app.route("/")
def index():
    return render_template('index.html') # You have to save the html files
                                         # inside of a 'templates' folder.
    
app.run(debug=True)
Comment

PREVIOUS NEXT
Code Example
Python :: tdmq python 
Python :: dunder pyhton 
Python :: Filter pandas DataFrame by substring criteria 
Python :: flatten nested list 
Python :: pandas number of columns 
Python :: pandas test for nan 
Python :: remove spaces from string python 
Python :: sleep in python 3 
Python :: second y axis matplotlib 
Python :: padnas drop column 
Python :: redirect stdout to variable python 
Python :: user group template tag django 
Python :: pd df to series 
Python :: plt.imshow not showing image 
Python :: conda import django 
Python :: take the first in dataloader pytorch 
Python :: Write a Python function to check whether a number is in a given range. 
Python :: how to set breakpoint in python pdb 
Python :: csrf token fetch django 
Python :: Python Program to count the number of lowercase letters and uppercase letters in a string. 
Python :: how to sum only the even values in python 
Python :: opencv waitkey example 
Python :: write data to using pickle 
Python :: jaccard distance python 
Python :: how to run bash script in python 
Python :: check if dataframe contains infinity 
Python :: plot sphere in matplotlib 
Python :: create exe from python script 
Python :: python datetime module 
Python :: how to open an image in opencv 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =