django templates with django girls

Bismillah


reference:
https://tutorial.djangogirls.org/en/css/


blog/templates/blog/post_list.html
{% load static %}

   
        Django Girls blog
       
       
       
   
   
       

           

Django Girls Blog


       

        {% for post in posts %}
           

                published: {{ post.published_date }}
               

{{ post.title }}


                {{ post.text|linebreaksbr }}
           
        {% endfor %}
   



blog/templates/blog/post_list.html



blog/static/css/blog.css
h1 a, h2 a {
    color: #C25100;
    font-family: 'Lobster';
}

blog/templates/blog/post_list.html

   

Django Girls Blog



And now add a class post to your div containing a blog post.

blog/templates/blog/post_list.html

    published: {{ post.published_date }}
   

{{ post.title }}


    {{ post.text|linebreaksbr }}





We really recommend taking the free online courses "Basic HTML & HTML5" and "Basic CSS" on freeCodeCamp.

No comments:

Post a Comment