<filename>listings/views.py<gh_stars>0
from django.shortcuts import render
from .models import Agency

# Create your views here.
def index(request): 
    
    agencys = Agency.objects.all()

    context = {
        'agencys': agencys
    }

    return render(request, 'listings/listings.html', context)
    
<filename>listings/views.py<gh_stars>0
from django.shortcuts import render
from .models import Agency

# Create your views here.
def index(request): 
    
    agencys = Agency.objects.all()

    context = {
        'agencys': agencys
    }

    return render(request, 'listings/listings.html', context)
    
# Create your views here.