Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
from API to ip
#7
this is ip http://178.128.203.72/

i have index.html

Output:
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <title>whatl0ol</title> <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}"> </head> <body> <div class="login"> <div class="heading"> <h2></h2> <form action=""{{ url_for('main') }}" method="post""> <div class="input-group input-group-lg"> <span class="input-group-addon"><i class="fa fa-user"></i></span> <input type="text" class="form-control" placeholder=""> </div> <button type="submit" id="send" name="send" class="float">check</button> </form> </div> </div> </body> </html>
and server.py

import requests
from flask import Flask, jsonify,render_template,request

app = Flask(__name__)

@app.route("/", methods=['GET', 'POST'])




def main():

        return render_template('index.html')



if __name__  == ("__main__"):
    app.run(debug = True, host = "0.0.0.0", port =80)
I want to input which entered in index.html take with server.py and send to api then return result

thanks

how can ii do this?
Reply


Messages In This Thread
from API to ip - by whatl0ol - Dec-05-2018, 09:11 PM
RE: from API to ip - by nilamo - Dec-05-2018, 10:09 PM
RE: from API to ip - by whatl0ol - Dec-05-2018, 10:11 PM
RE: from API to ip - by nilamo - Dec-05-2018, 10:13 PM
RE: from API to ip - by whatl0ol - Dec-05-2018, 10:19 PM
RE: from API to ip - by nilamo - Dec-06-2018, 04:45 AM
RE: from API to ip - by whatl0ol - Dec-06-2018, 04:11 PM
RE: from API to ip - by nilamo - Dec-06-2018, 04:49 PM
RE: from API to ip - by whatl0ol - Dec-06-2018, 04:49 PM
RE: from API to ip - by nilamo - Dec-06-2018, 05:10 PM
RE: from API to ip - by snippsat - Dec-06-2018, 11:00 PM
html to python - by whatl0ol - Dec-06-2018, 12:36 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020