aviary first view and template
This commit is contained in:
parent
462b9ff224
commit
5e5605524f
8 changed files with 61 additions and 21 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue