Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to get value from txtbox in flask

from flask import Flask, request, render_template

app = Flask(__name__)

@app.route('/')
def my_form():
    return render_template('my-form.html')

@app.route('/', methods=['POST'])
def my_form_post():
    text = request.form['text']
    processed_text = text.upper()
    return processed_text
Comment

how to get value from txtbox in flask

<form method="POST">
    <input name="text">
    <input type="submit">
</form>
Comment

PREVIOUS NEXT
Code Example
Python :: What is role of ALLOWED_HOSTs in Django 
Python :: how to install ffmpeg python heroku 
Python :: how to make python file executable 
Python :: make an android app with python 
Python :: numpy moving average 
Python :: How to remove all characters after a specific character in python? 
Python :: python insert list 
Python :: seaborn iris dataset 
Python :: how to create python file in powershell 
Python :: dijkstras python 
Python :: jupyter notebook show full dataframe cell 
Python :: how to square root in python 
Python :: not null constraint failed django 
Python :: merge multiple excel workssheets into a single dataframe 
Python :: python iterating through a string 
Python :: how to find the speed of a python program 
Python :: python delete element from list 
Python :: cors flask 
Python :: get column index of maximum value in each row pandas 
Python :: python last n list elements 
Python :: pandas plot date histogram 
Python :: import ndimage 
Python :: how to make a discord bot in python 
Python :: how to add extra zeros after decimal in python 
Python :: python equals override 
Python :: pandas get outliers 
Python :: how to get user id django 
Python :: python winsound 
Python :: rotate matrix python 
Python :: extract all text from website using beautifulsoup and python 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =