|
|
|
@ -594,14 +594,14 @@ STORAGE='/home/jbiason/src/ata/contents'</code></pre>
|
|
|
|
|
<h3><code>index.html</code></h3> |
|
|
|
|
|
|
|
|
|
<pre><code>{% extends "layout.html" %} |
|
|
|
|
{% block maincontent %} |
|
|
|
|
{% block maincontent %} |
|
|
|
|
<div class='entry'> |
|
|
|
|
{% for entry, text in data %} |
|
|
|
|
<a href="{{ url_for('show_entry', entry_name=entry) }}">{{ entry }}</a> |
|
|
|
|
{{ text|safe }} |
|
|
|
|
{% endfor %} |
|
|
|
|
</div> |
|
|
|
|
{% endblock %}</code></pre> |
|
|
|
|
{% endblock %}</code></pre> |
|
|
|
|
|
|
|
|
|
<aside class="notes"> |
|
|
|
|
O arquivo apresentado na raíz da aplicação. |
|
|
|
@ -616,12 +616,12 @@ STORAGE='/home/jbiason/src/ata/contents'</code></pre>
|
|
|
|
|
<h3><code>entry.html</code></h3> |
|
|
|
|
|
|
|
|
|
<pre><code>{% extends "layout.html" %} |
|
|
|
|
{% block maincontent %} |
|
|
|
|
{% block maincontent %} |
|
|
|
|
<div class="entry"> |
|
|
|
|
<div class="title">{{ entry }}</div> |
|
|
|
|
{{ output|safe }} |
|
|
|
|
</div> |
|
|
|
|
{% endblock %}</code></pre> |
|
|
|
|
{% endblock %}</code></pre> |
|
|
|
|
|
|
|
|
|
<aside class="notes"> |
|
|
|
|
Como apresentar somente uma entrada. |
|
|
|
@ -633,9 +633,9 @@ STORAGE='/home/jbiason/src/ata/contents'</code></pre>
|
|
|
|
|
<h3><code>page_not_found.html</code></h3> |
|
|
|
|
|
|
|
|
|
<pre><code>{% extends "layout.html" %} |
|
|
|
|
{% block maincontent %} |
|
|
|
|
{% block maincontent %} |
|
|
|
|
<h2>Page not found</h2> |
|
|
|
|
{% endblock %}</code></pre> |
|
|
|
|
{% endblock %}</code></pre> |
|
|
|
|
|
|
|
|
|
<aside class="notes"> |
|
|
|
|
A página quando ocorrer um 404... |
|
|
|
@ -647,15 +647,32 @@ STORAGE='/home/jbiason/src/ata/contents'</code></pre>
|
|
|
|
|
<h3><code>entry_not_found.html</code></h3> |
|
|
|
|
|
|
|
|
|
<pre><code>{% extends "layout.html" %} |
|
|
|
|
{% block maincontent %} |
|
|
|
|
{% block maincontent %} |
|
|
|
|
<h2>Entry not found</h2> |
|
|
|
|
{% endblock %}</code></pre> |
|
|
|
|
{% endblock %}</code></pre> |
|
|
|
|
|
|
|
|
|
<aside class="notes"> |
|
|
|
|
... e quando a entrada não existir |
|
|
|
|
(que é a captura do nosso FileNotFoundError) |
|
|
|
|
</aside> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Rodando</h2> |
|
|
|
|
<h3>(Dev server)</h3> |
|
|
|
|
|
|
|
|
|
<pre><code> |
|
|
|
|
FLASK_APP=ata/main.py flask run |
|
|
|
|
</code></pre> |
|
|
|
|
|
|
|
|
|
<pre class="fragment"><code> |
|
|
|
|
export FLASK_RUN=ata/main |
|
|
|
|
flask run |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section data-background='_images/thats-all-folks.jpg'> |
|
|
|
|
<section> |
|
|
|
|