views.py 287 Bytes
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
from django.shortcuts import render
Florent Chehab's avatar
Florent Chehab committed
2
from rex.models.university import University
Florent Chehab's avatar
Florent Chehab committed
3

4
5

def home(request):
Florent Chehab's avatar
Florent Chehab committed
6
    universities = University.objects.all()
Florent Chehab's avatar
Florent Chehab committed
7
8
    for univ in universities:
        univ.loc = univ.location()
Florent Chehab's avatar
linting    
Florent Chehab committed
9
    return render(request, 'rex/home.html', {'universities': universities})