title: Returning rendered template with Flask-Restful shows HTML in browser
body: <p>I am new to Python and Flask. I have a templates folder in the the root of my application whic has two file.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
     &lt;html lang="en"&gt;
     &lt;head&gt;
       &lt;title&gt;{% block title %}{% endblock title %}&lt;/title&gt;
  
       &lt;link href="http://netdna.bootstrapcdn.com/bootswatch/2.3.2/united/bootstrap.min.css" rel="stylesheet"&gt;
       &lt;link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/ bootstrap-responsive.min.css" rel="stylesheet"&gt;
       &lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
       &lt;script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="main"&gt;
      &lt;div class="utility-nav navbar navbar-fixed-top"&gt;
      &lt;div class="navbar-inner"&gt;
      &lt;div class="container"&gt;
        {# Navbar goes here. #}
      &lt;/div&gt;
     &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="content container"&gt;
      {% block main %}{% endblock main %}
    &lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>{% extends 'base.html' %}
  {% block title %}Page Title{% endblock title %}
  {% block main %}
      &lt;h2&gt;This is a child template.&lt;/h2&gt;
  {% endblock main %}
  </code></pre>
  
  <p>And then i have the following function</p>
  
  <pre><code>from flask.ext.restful import Resource,request,reqparse
  from app.business.login import Login
  from app.business.appointments import Appointments 
  from app.models.models import User, Address,Appointment
  from flask import render_template
      class AppointmentController(Resource):
          def __init__(self):
              pass
          def get(self):
          return render_template('index.html')
  </code></pre>
  
  <p>so when i start the server up and say <code>http://0.0.0.0:5000/appointment</code> i get</p>
  
  <pre><code>"&lt;!DOCTYPE html&gt;\n   &lt;html lang=\"en\"&gt;\n   &lt;head&gt;\n     &lt;title&gt;Page Title&lt;/title&gt;\n    \n     &lt;link href=\"http://netdna.bootstrapcdn.com/bootswatch/2.3.2/united/bootstrap.min.css\" rel=\"stylesheet\"&gt;\n     &lt;link href=\"http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/ bootstrap-responsive.min.css\" rel=\"stylesheet\"&gt;\n     &lt;script src=\"http://code.jquery.com/jquery-1.9.1.min.js\"&gt;&lt;/script&gt;\n     &lt;script src=\"http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js\"&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n  &lt;div id=\"main\"&gt;\n    &lt;div class=\"utility-nav navbar navbar-fixed-top\"&gt;\n    &lt;div class=\"navbar-inner\"&gt;\n    &lt;div class=\"container\"&gt;\n      \n    &lt;/div&gt;\n   &lt;/div&gt;\n  &lt;/div&gt;\n  &lt;div class=\"content container\"&gt;\n    \n\t&lt;h2&gt;This is a child template.&lt;/h2&gt;\n\n  &lt;/div&gt;\n  &lt;/div&gt;\n&lt;/body&gt;\n&lt;/html&gt;"
  </code></pre>
  
  <p>Meaning the templates are working but the browser is treating the response as a String and not html. What am i doing wrong. </p>