title: I am passing python objects to a template (using jinja) and it is not working for one template but does for the others
body: <p>I have a list of country objects which have attributes such as name, continent, population, abbreviation, etc, and am simply trying to pass that object to a html template. I have other routes all coded the same which work fine but for some reason the country object is passed as a string, and the list appears to be empty.</p>
  
  <pre><code>@app.route('/continents/&lt;continent&gt;/&lt;country&gt;')
  def countryView(country, continent):
      countries = []
      for c in countriesWorld:
          if c.continent == continent:
              countries.append(c)
          if c.name == country:
              country = c
      return render_template('countryview.html', country=country,        
  countries=countries), 200
  </code></pre>
  
  <p>here is my html/jinja template</p>
  
  <pre><code>{% extends "base.html" %}
  {% block content %}
      &lt;div id="countrycontainer"&gt;
          &lt;h1&gt;{{ country.name }}&lt;/h1&gt;
          &lt;img src="{{ "../static/img/flags/" ~ country.abbreviation ~ ".png" 
  }}"&gt;
  &lt;/div&gt;
  
  {% endblock %}}
  </code></pre>
  
  <p>if i use '{{ country }} instead of country name, the name shows up, so clearly it has been passed as a string instead of an object and I Cannot work out why. Any help would be appreciated</p>