title: Python Flask- using Iframe in my template in my project
body: <p>I stuck at here,
  I am doing a project in Banana Pi board and installed Debian related OS
  Using Python 2.7.
  I had four html pages they are:</p>
  
  <ul>
  <li>main.html</li>
  <li>motor1.html</li>
  <li>motor2.html</li>
  <li>sensor1.html</li>
  <li>sensor2.html</li>
  </ul>
  
  <hr>
  
  <p>I am using Flask application to run the main.html which contains all the other pages in iframe's in main.html</p>
  
  <p>my code for app.py is</p>
  
  <pre><code>    from flask import Flask,render_template
      app = Flask(__name__)
  
      @app.route('/')
      def index():
     return render_template('main.html')    
      if __name__ == "__main__":
         app.run(debug=True)    
  </code></pre>
  
  <p>main.html is as follows:</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
      &lt;html&gt;
      &lt;head&gt;
      &lt;title&gt;Pi Board&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"&gt;
      &lt;script&gt;
      function myFunc(){
         setTimeout("location.reload(true);",60000);
      }
      myFunc();
      &lt;/script&gt;
      &lt;style&gt;
       body {background-color : lightgray;}
       #frame1,#frame2{width: 300px; height : 200px; float: absolute;}
  
      &lt;/style&gt;
      &lt;/head&gt;
      &lt;body  &gt;
      &lt;header&gt;&lt;h2&gt;XYZ Automation&lt;/h2&gt;&lt;/header&gt;
      &lt;iframe id="frame1" src="motor1.html"&gt;&lt;/iframe&gt;
      &lt;iframe id="frame1" src="sensor1.html"&gt;&lt;/iframe&gt;&lt;br&gt;
      &lt;iframe id="frame2" src="motor2.html"&gt;&lt;/iframe&gt;
      &lt;iframe id="frame2" src="sensor2.html"&gt;&lt;/iframe&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>and I kept all the files in folders as follows:
  project(MainFolder):->
      templates
      app.py
  templates(Subfolder):->
      main.html
  ,    motor1.html
  ,    motor2.html
  ,   sensor1.html
  ,    sensor2.html
  ,    script.js.
  ,    style(folder)
    style(folder):->
      styles.css,</p>
  
  <p>Here are the images while I am running the code:
  <a href="http://i.stack.imgur.com/iVbZI.png" rel="nofollow">in commandline</a>
  <a href="http://i.stack.imgur.com/jZBu9.png" rel="nofollow">in browser</a></p>
  
  <p>PS: I started working with Flask for the first time and I had no knowledge in these server things.. and this is a project given by my sir.. please help me.</p>
  
  <p>Regards,</p>
  
  <p>Krishna.</p>