Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Flask - Opening second page via href is failing - This site can’t be reached
#1
I have small Python Flask application which is running over IIS Windows server, when trying to navigate to second page I'm getting the error:
"This site can’t be reached"

IIS FastCGI is bending the website to http://10.235.244.92:97/ which is working as the main page

The problem is with the href:
<a href="http://127.0.0.1:5000/second">Open Second Page</a>
I tried also to modify It to below but Its not working
<a href="http://10.235.244.92:97/second">Open Second Page</a>

Below is the code:

Main:
-----
from flask import Flask, render_template
app = Flask(__name__, static_url_path="/static")
@app.route('/')
def home():
return render_template('home.html')

@app.route('/second')
def home2():
return render_template('Second.html')


if __name__ == '__main__':
app.run()

home:
-----
<!DOCTYPE html>
<html>
<body>
<h1><u> Website</u></h1>
<p>Hi, welcome to the Site</p>
<a href="http://127.0.0.1:5000/second">Open Second Page</a>
<p> </p>
<img src="/static/smiley.gif" width="50" height="50" align ="bottom" align="center">

</body>
</html>
Quote
#2
Change your HOME doc to:
<a href="<http://10.235.244.92:97/second >">Open Second Page</a>
Quote
#3
Smile Tnx working
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Flask: Making my first web site Truman 38 2,436 Oct-03-2019, 09:10 PM
Last Post: Truman
  Web Page not opening while web scraping through python selenium sumandas89 4 2,515 Nov-19-2018, 02:47 PM
Last Post: snippsat
  Project: Opening all links within a web page Truman 0 525 Aug-07-2018, 12:33 AM
Last Post: Truman
  Scrapy Picking What to Output Href or Img soothsayerpg 1 646 Aug-02-2018, 10:59 AM
Last Post: soothsayerpg
  Failing to install Flask on Windows using pip shayon 1 761 Jul-11-2018, 12:36 AM
Last Post: micseydel
  webscraping - failing to extract specific text from data.gov rontar 2 668 May-19-2018, 08:01 AM
Last Post: rontar

Forum Jump:


Users browsing this thread: 1 Guest(s)