1设置一个static文件
2.templates文jian
img.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <img src="{{qrimg}}" alt=""> </body> </html>
text.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <form action="/text"method="post"> 请输入文本:<textarea name="text" id="" cols="30" rows="10"></textarea> <input type="submit" value="生成"> url.html </form> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>二维码生成首页</title> </head> <form action="/url" method="post"> url:<input type = "text" name="text" value="http://"> <input type="submit" value="生成"> </form> </body> </html>
aan.py
def func(): print (1) print( __name__) if __name__ =='__main__': func()
app.py
def func(): print (1) print( __name__) if __name__ =='__main__': func()
codes.py
需要者留言........................