Compare commits
2 Commits
1a70c1437e
...
adc0fd4d5e
Author | SHA1 | Date | |
---|---|---|---|
adc0fd4d5e | |||
8889314d9e |
@ -24,7 +24,13 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="LP-PlaceTeaser__Description">
|
||||
<p class="LP-Paragraph">{{place.description|truncatechars:210|truncatewords:-1}}</p>
|
||||
<p class="LP-Paragraph">
|
||||
{% if place.description|length > 210 %}
|
||||
{{place.description|truncatechars:210|truncatewords:-1}}
|
||||
{% else %}
|
||||
{{place.description}}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="LP-PlaceTeaser__Icons">
|
||||
<ul class="LP-Icon__List">
|
||||
|
@ -63,7 +63,7 @@ class PlaceDetailView(IsAuthenticated, View):
|
||||
|
||||
class HomeView(View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
place_list = Place.objects.all().order_by('submitted_when')[:10]
|
||||
place_list = Place.objects.all().order_by('-submitted_when')[:10]
|
||||
context = {
|
||||
'place_list': place_list
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user