Compare commits

...

2 Commits

2 changed files with 8 additions and 2 deletions

View File

@ -24,7 +24,13 @@
</span> </span>
</div> </div>
<div class="LP-PlaceTeaser__Description"> <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>
<div class="LP-PlaceTeaser__Icons"> <div class="LP-PlaceTeaser__Icons">
<ul class="LP-Icon__List"> <ul class="LP-Icon__List">

View File

@ -63,7 +63,7 @@ class PlaceDetailView(IsAuthenticated, View):
class HomeView(View): class HomeView(View):
def get(self, request, *args, **kwargs): 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 = { context = {
'place_list': place_list 'place_list': place_list
} }