Django for ISchoolers: Difference between revisions

Content added Content deleted
imported>Aldeka
imported>Aldeka
Line 797: Line 797:
Ah. There’s no template yet. Let’s make one!
Ah. There’s no template yet. Let’s make one!


* Make a qandabear/templates/qandabear directory where templates will live. Right alongside the views.py for the qandabear app. This is what I would do:
* Make a qandabear/templates/qandabear directory where templates will live, right alongside the views.py for the qandabear app. This is what I would do:


<source lang="python">
<source lang="python">
mkdir -p qandabear/templates/qandabear
mkdir -p qandabear/templates/qandabear
</source>
Edit qandabear/templates/qandabear/index.html to contain.

Edit qandabear/templates/qandabear/index.html to contain:

<source lang="python">
{% if latest_qs %}
{% if latest_qs %}
<ul>
<ul>