from django.shortcuts import render, get_object_or_404

from django.http import HttpResponse

from models import People, Role

def peopleHome(request):
    # Do select * query
    people = People.objects.all().prefetch_related('roles');
    roles = Role.objects.all();

    return render(request, 'people.html', {
        'people_list' : people,
        'role_list' : roles
        })

4cd5354b6e6b5fdf00d4115babfd3e21a37277a2
<mask token>

<mask token>


def peopleHome(request):
    people = People.objects.all().prefetch_related('roles')
    roles = Role.objects.all()
    return render(request, 'people.html', {'people_list': people,
        'role_list': roles})

from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse
from models import People, Role


def peopleHome(request):
    people = People.objects.all().prefetch_related('roles')
    roles = Role.objects.all()
    return render(request, 'people.html', {'people_list': people,
        'role_list': roles})

from django.shortcuts import render, get_object_or_404

from django.http import HttpResponse

from models import People, Role

def peopleHome(request):
    # Do select * query
    people = People.objects.all().prefetch_related('roles');
    roles = Role.objects.all();

    return render(request, 'people.html', {
        'people_list' : people,
        'role_list' : roles
        })
