<html>
    <head>
        <title>Django boy blog</title>
    </head>
    <body>
        <div>
            <h1><a href="">Django boy Blog</a></h1>
        </div>

        <div>
            <p>published: 14.06.2014, 12:14</p>
            <h2><a href="">My first post</a></h2>
            <p>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
        </div>

        <div>
            <p>published: 14.06.2014, 12:14</p>
            <h2><a href="">My second post</a></h2>
            <p>What the heck?! sem lacinia quam venenatis vestibulum. Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut f.</p>
        </div>
    </body>
</html>
<html>
    <head>
        <title>Django boy blog</title>
    </head>
    <body>
        <div>
            <h1><a href="">Django boy Blog</a></h1>
        </div>

        <div>
            {% for post in posts %}
            <div>
                <p>published: {{post.published_date}}</p>
                <h1><a href="">{{post.title}}</a> </h1>
                <p>{{post.text | linebreaksbr}}</p>
            </div>
            {% endfor %}
        </div>
    </body>
</html>
Connect template to model through Querysets
Connect template to model through Querysets
