Skip to content

Commit

Permalink
Updated main_page view to show all pets
Browse files Browse the repository at this point in the history
  • Loading branch information
Fer-Bar committed Apr 12, 2024
1 parent 243a13d commit d65f5c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pet/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from django.shortcuts import render
from django.views.decorators.http import require_http_methods

from pet.models import Pet


@require_http_methods(["GET"])
def main_page(request):
return render(request, 'pet/main_page.html')
pets = Pet.objects.all()
return render(request, "pet/main_page.html", context={"pets": pets})

0 comments on commit d65f5c9

Please sign in to comment.