from django.shortcuts import render from .models import Property def index(request): properties = Property.objects.all()[:6] context = { 'properties': properties } return render(request, 'core/index.html', context)