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

Removed files and lines that were making flake8 crash in pipelines

parent f385513b
{% extends 'main_website/base.html' %}
{% load staticfiles %}
{% block content %}
<div id="mapid" style="height:400px"></div>
<link rel="stylesheet" href="{% static 'css/leaflet.css' %}"/>
<script type="text/javascript" src="{% static 'js/leaflet.js' %}"></script>
<link rel="stylesheet" href="{% static 'css/MarkerCluster.css' %}"/>
<link rel="stylesheet" href="{% static 'css/MarkerCluster.Default.css' %}"/>
<script type="text/javascript" src="{% static 'js/leaflet.markercluster.js' %}"></script>
<script>
var Stamen_Watercolor = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.{ext}', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
subdomains: 'abcd',
minZoom: 1,
maxZoom: 18,
ext: 'png'
});
var Stamen_Label = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-labels/{z}/{x}/{y}.{ext}', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
subdomains: 'abcd',
minZoom: 1,
maxZoom: 18,
ext: 'png'
});
var OpenStreetMap_France = L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {
maxZoom: 20,
attribution: '&copy; Openstreetmap France | &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});
var Esri_WorldImagery = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
});
var Stamen = L.layerGroup();
Stamen_Watercolor.addTo(Stamen);
Stamen_Label.addTo(Stamen);
var baseLayers = {
"Stamen Watercolor": Stamen,
"OpenStreetMap": OpenStreetMap_France,
"Satellite": Esri_WorldImagery
};
// End of handling of layers, now let's handle markers.
var universities_markers = L.markerClusterGroup();
{% for camp in campus %}
L.marker([{{ camp.lat }}, {{ camp.lon }}]).addTo(universities_markers)
.bindPopup("<b>{{ camp.university.name }}</b>");
{% endfor %}
// Creation of map
var mymap = L.map('mapid', {'layers':[Stamen, universities_markers]}).setView([45, 1.2], 4);
L.control.layers(baseLayers).addTo(mymap);
// Extra feature
var popup = L.popup();
function onMapClick(e) {
popup
.setLatLng(e.latlng)
.setContent("You clicked the map at " + e.latlng.toString())
.openOn(mymap);
}
mymap.on('click', onMapClick);
</script>
<!-- {% for univ in universities %}
<p>{{ univ.country.name }}</p>
{% endfor %} -->
{% endblock %}
\ No newline at end of file
from django.conf.urls import url, include
from backend import views
from rest_framework import routers
from backend.models.location import CountryViewSet
from backend.models.location import CityViewSet
......
from django.shortcuts import render
from backend.models.university import Campus
# def home(request):
# campus = Campus.objects.filter(is_main_campus=True).select_related()
# return render(request, 'rex/home.html', {'campus': campus})
# TODO clean old stuff (remove it)
\ No newline at end of file
Markdown is supported
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