Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://code.google.com/intl/it/appengine/docs/python/tools/webapp/" rel="nofollow">Webapp</a> is probably escaping your raw html.<br> Try to add a <code>safe</code> filter like this:</p> <pre><code>{{ the_button|safe }} </code></pre> <p>From Django <a href="http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#safe" rel="nofollow">documentation</a>:</p> <blockquote> <p><strong>safe</strong><br> Marks a string as not requiring further HTML escaping prior to output.<br> When autoescaping is off, this filter has no effect.</p> </blockquote> <p><strong>EDIT:</strong><br> Unluckily Google App Engine out of the box runs Django 0.96 that does not have that feature.<br> You have two options:</p> <ol> <li>Install a more recent version of Django (<a href="http://www.allbuttonspressed.com/projects/django-nonrel#documentation" rel="nofollow">Django-NonRel</a>) </li> <li>Ask yourself why you need to pass a raw risky html snippet from the controller to the view.<br> I would move that button to the view instead, allowing the controller to show it or not using a simple <code>show_button</code> boolean variable.</li> </ol> <p>In the controller:</p> <pre><code>show_button = true template_values = { 'show_button':show_button } path = os.path.join(os.path.dirname(__file__), 'the.html') self.response.out.write(template.render(path, template_values)) </code></pre> <p>In <code>the.html</code></p> <pre><code>{%if show_button %} &lt;form action="/edit" method="get" &gt; &lt;input type="submit" name="edit" value="Edit" /&gt; &lt;/form&gt; {% endif %} </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload