Actually implement up to 5 blogs in template.
The early change to frontpage.py was not sufficient; the template obviously needs to make use of those five blog posts as well. Note the cascading effect here. We only put lots on the front page if they are recent.
This commit is contained in:
		
							parent
							
								
									b5eaeb9919
								
							
						
					
					
						commit
						5368c0a8b7
					
				
					 1 changed files with 41 additions and 1 deletions
				
			
		|  | @ -99,8 +99,48 @@ | |||
| <h3><a href="{{ blog.1.get_absolute_url }}">{{ blog.1.headline|safe }}</a></h3> | ||||
| <p class="date">Posted by {{ blog.1.author.formal_name }} on {{ blog.1.pub_date|date:"F j, Y" }}</p> | ||||
| {{ blog.1.summary|safe }} | ||||
| <p><span class="continued"><a href="{{ blog.0.get_absolute_url }}">Read More from {{ blog.1.author.casual_name }} on this…</a></span></p> | ||||
| <p><span class="continued"><a href="{{ blog.1.get_absolute_url }}">Read More from {{ blog.1.author.casual_name }} on this…</a></span></p> | ||||
| {% endif %} | ||||
| {% if blog.2.is_recent %} | ||||
| {% if blog.2.pub_date|date_within_past_days:20 %} | ||||
| <hr/> | ||||
| <h3><a href="{{ blog.2.get_absolute_url }}">{{ blog.2.headline|safe }}</a></h3> | ||||
| <p class="date">Posted by {{ blog.2.author.formal_name }} on {{ blog.2.pub_date|date:"F j, Y" }}</p> | ||||
| {{ blog.1.summary|safe }} | ||||
| <p><span class="continued"><a href="{{ blog.2.get_absolute_url }}">Read More from {{ blog.2.author.casual_name }} on this…</a></span></p> | ||||
| {% endif %} | ||||
| {% endif %} | ||||
| 
 | ||||
| {% if blog.3.is_recent %} | ||||
| {% if blog.3.pub_date|date_within_past_days:15 %} | ||||
| <hr/> | ||||
| <h3><a href="{{ blog.3.get_absolute_url }}">{{ blog.3.headline|safe }}</a></h3> | ||||
| <p class="date">Posted by {{ blog.3.author.formal_name }} on {{ blog.3.pub_date|date:"F j, Y" }}</p> | ||||
| {{ blog.1.summary|safe }} | ||||
| <p><span class="continued"><a href="{{ blog.3.get_absolute_url }}">Read More from {{ blog.3.author.casual_name }} on this…</a></span></p> | ||||
| {% endif %} | ||||
| {% endif %} | ||||
| 
 | ||||
| {% if blog.4.is_recent %} | ||||
| {% if blog.4.pub_date|date_within_past_days:10 %} | ||||
| <hr/> | ||||
| <h3><a href="{{ blog.4.get_absolute_url }}">{{ blog.4.headline|safe }}</a></h3> | ||||
| <p class="date">Posted by {{ blog.4.author.formal_name }} on {{ blog.4.pub_date|date:"F j, Y" }}</p> | ||||
| {{ blog.1.summary|safe }} | ||||
| <p><span class="continued"><a href="{{ blog.4.get_absolute_url }}">Read More from {{ blog.4.author.casual_name }} on this…</a></span></p> | ||||
| {% endif %} | ||||
| {% endif %} | ||||
| 
 | ||||
| {% if blog.5.is_recent %} | ||||
| {% if blog.5.pub_date|date_within_past_days:7 %} | ||||
| <hr/> | ||||
| <h3><a href="{{ blog.5.get_absolute_url }}">{{ blog.5.headline|safe }}</a></h3> | ||||
| <p class="date">Posted by {{ blog.5.author.formal_name }} on {{ blog.5.pub_date|date:"F j, Y" }}</p> | ||||
| {{ blog.1.summary|safe }} | ||||
| <p><span class="continued"><a href="{{ blog.5.get_absolute_url }}">Read More from {{ blog.5.author.casual_name }} on this…</a></span></p> | ||||
| {% endif %} | ||||
| {% endif %} | ||||
| 
 | ||||
| </div> | ||||
| {% endif %} | ||||
| <p><span class="continued"><a href="/blog/">Conservancy Blog Archive…</a></span></p> | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Bradley M. Kuhn
						Bradley M. Kuhn