feat: Use adoption list template in index too
This commit is contained in:
		@@ -2,13 +2,11 @@
 | 
			
		||||
{% load i18n %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <h1>{% translate "Notfellchen - Vermittlungen finden" %}</h1>
 | 
			
		||||
  <p>{% translate "Alle Tiere brauchen ein liebendes Zuhause. Damit keins vergessen wird gibt es diese Seite. Entwickelt und betreut von " %}<em><a href="https://hyteck.de">moanos</a></em>!</p>
 | 
			
		||||
  <h2>{% translate "Aktuelle Vermittlungen" %}</h2>
 | 
			
		||||
  <ul>
 | 
			
		||||
    {% for adoption_notice in latest_adoptions  %}
 | 
			
		||||
    <li><a href="{{ adoption_notice.get_absolute_url }}">{{ adoption_notice.name }}</a>: {{ adoption_notice.animals | join:", "  }} </li>
 | 
			
		||||
 | 
			
		||||
  {% endfor %}
 | 
			
		||||
    <h1>{% translate "Notfellchen - Vermittlungen finden" %}</h1>
 | 
			
		||||
    <p>{% translate "Alle Tiere brauchen ein liebendes Zuhause. Damit keins vergessen wird gibt es diese Seite. Entwickelt und betreut von " %}<em><a
 | 
			
		||||
            href="https://hyteck.de">moanos</a></em>!</p>
 | 
			
		||||
    <h2>{% translate "Aktuelle Vermittlungen" %}</h2>
 | 
			
		||||
    <ul>
 | 
			
		||||
        {% include "fellchensammlung/list-adoption-notices.html" %}
 | 
			
		||||
    </ul>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -10,7 +10,7 @@ from .forms import AdoptionNoticeForm, AnimalForm
 | 
			
		||||
def index(request):
 | 
			
		||||
    """View function for home page of site."""
 | 
			
		||||
    latest_adoption_list = AdoptionNotice.objects.order_by("-created_at")[:5]
 | 
			
		||||
    context = {"latest_adoptions": latest_adoption_list}
 | 
			
		||||
    context = {"adoption_notices": latest_adoption_list}
 | 
			
		||||
 | 
			
		||||
    return render(request, 'fellchensammlung/index.html', context=context)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user