Commit f43f9776 authored by Florent Chehab's avatar Florent Chehab
Browse files

Update view to render with new campus format

parent 5b2410d0
......@@ -53,9 +53,9 @@
var universities_markers = L.markerClusterGroup();
{% for univ in universities %}
L.marker([{{ }}, {{ univ.loc.lon }}]).addTo(universities_markers)
.bindPopup("<b>{{ }}</b>");
{% for camp in campus %}
L.marker([{{ }}, {{ camp.lon }}]).addTo(universities_markers)
.bindPopup("<b>{{ }}</b>");
{% endfor %}
from django.shortcuts import render
from import University
from import Campus
def home(request):
universities = University.objects.all()
for univ in universities:
univ.loc = univ.location()
return render(request, 'rex/home.html', {'universities': universities})
campus = Campus.objects.filter(is_main_campus=True).select_related()
return render(request, 'rex/home.html', {'campus': campus})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment