This commit is contained in:
Rad 2019-02-25 23:51:26 +00:00
parent 75acd74d5b
commit a013f5bef2
2 changed files with 6 additions and 3 deletions

View File

@ -51,14 +51,14 @@ def caveCmp(x, y):
def caveindex(request): def caveindex(request):
caves = Cave.objects.all() caves = Cave.objects.all()
newfield = str("testing123") newfield = "testing123"
notablecavehrefs = settings.NOTABLECAVESHREFS notablecavehrefs = settings.NOTABLECAVESHREFS
notablecaves = [Cave.objects.get(kataster_number=kataster_number) for kataster_number in notablecavehrefs ] notablecaves = [Cave.objects.get(kataster_number=kataster_number) for kataster_number in notablecavehrefs ]
caves1623 = list(Cave.objects.filter(area__short_name = "1623")) caves1623 = list(Cave.objects.filter(area__short_name = "1623"))
caves1626 = list(Cave.objects.filter(area__short_name = "1626")) caves1626 = list(Cave.objects.filter(area__short_name = "1626"))
caves1623.sort(caveCmp) caves1623.sort(caveCmp)
caves1626.sort(caveCmp) caves1626.sort(caveCmp)
return render_with_context(request,'caveindex.html', {'newfield': newfield, 'caves1623': caves1623, 'caves1626': caves1626, 'notablecaves':notablecaves, 'cavepage': True}) return render_with_context(request,'caveindex.html', {'newfield': caves1623, 'caves1623': caves1623, 'caves1626': caves1626, 'notablecaves':notablecaves, 'cavepage': True})
def millenialcaves(request): def millenialcaves(request):
caves = Cave.objects.all() caves = Cave.objects.all()

View File

@ -10,7 +10,10 @@
<p>{{ newfield }}</p> <p>{{ newfield }}</p>
Testing 123, Testing 123 Testing 123, Testing 123
{{ newfield }} {% for cave in newfield %}
bla
{% endfor %}
Testing 123
<h3>Notable caves</h3> <h3>Notable caves</h3>
<ul> <ul>