title: Is there a way to pass variables into Jinja2 parents?
body: <p>I'm trying to pass some variables from the child page to the template. This is my python code:</p>
  
  <pre><code>    if self.request.url.find("&amp;try") == 1:
          isTrying = False
      else:
          isTrying = True
  
      page_values = {
          "trying": isTrying
      }
  
      page = jinja_environment.get_template("p/index.html")
      self.response.out.write(page.render(page_values))
  </code></pre>
  
  <p>The template:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;link type="text/css" rel="stylesheet" href="/css/template.css"&gt;&lt;/link&gt;
      &lt;title&gt;{{ title }} | SST QA&lt;/title&gt;
  
      &lt;script src="/js/jquery.min.js"&gt;&lt;/script&gt;
  
    {% block head %}{% endblock head %}
    &lt;/head&gt;
    &lt;body&gt;
      {% if not trying %}
      &lt;script type="text/javascript"&gt;
      // Redirects user to maintainence page
      window.location.href = "construct"
      &lt;/script&gt;
      {% endif %}
  
      {% block content %}{% endblock content %}
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and the child:</p>
  
  <pre><code>{% extends "/templates/template.html" %}
  {% set title = "Welcome" %}
  {% block head %}
  {% endblock head %}
  {% block content %}
  {% endblock content %}
  </code></pre>
  
  <p>The problem is, I want to pass the variable "trying" into the parent, is there a way to do this?</p>
  
  <p>Thanks in advance!</p>