Created
February 21, 2018 17:00
-
-
Save girisagar46/402fdfcd2a4f3d75f3a71af54f6bbf9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table border="1px solid"> | |
<thead> | |
<tr> | |
<th>Dates</th> | |
<th>Latitude</th> | |
<th>Longitude</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
{% for each in output %} | |
<td> | |
<table> | |
{% for data in each %} | |
<tr> | |
<td> | |
{{ data }} | |
</td> | |
</tr> | |
{% endfor %} | |
</table> | |
</td> | |
{% endfor %} | |
</tr> | |
</tbody> | |
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test(request): | |
s = '' | |
s = ('dates,lat,long', ['date1', 'date2', 'date3'], [4, 5, 6], [7, 8, 9]) | |
data = { | |
"output": s[1:len(s)] # Here we are slicing the output, since s[0] will mess up the HTML | |
} | |
return render(request, 'test.html', context=data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment