aviary first view and template

This commit is contained in:
gw3000 2023-07-01 09:21:58 +02:00
parent 462b9ff224
commit 5e5605524f
8 changed files with 61 additions and 21 deletions

View file

@ -1,3 +1,11 @@
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
# Create your views here.
from .models import Aviary
@login_required(login_url="account_login")
def aviary_all(request):
aviaries = Aviary.objects.all()
context = {"aviaries": aviaries}
return render(request, "aviary/aviary_all.html", context)