Stripped down unauth_home template, limited places to 5.
This commit is contained in:
parent
91c888db8f
commit
b95e565bef
31
lostplaces/lostplaces_app/templates/home_unauth.html
Normal file
31
lostplaces/lostplaces_app/templates/home_unauth.html
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{% extends 'global.html'%}
|
||||||
|
|
||||||
|
# {% block title %}Start{% endblock %}
|
||||||
|
|
||||||
|
{% block maincontent %}
|
||||||
|
|
||||||
|
<div class="LP-PlaceGrid">
|
||||||
|
<h1 class="LP-Headline LP-Headline">Our latest locations</h1>
|
||||||
|
<ul class="LP-PlaceGrid__Grid">
|
||||||
|
{% for place in place_list %}
|
||||||
|
<li class="LP-PlaceGrid__Item">
|
||||||
|
<a href="{% url 'place_detail' pk=place.pk %}" class="LP-Link">
|
||||||
|
<article class="LP-PlaceTeaser">
|
||||||
|
<div class="LP-PlaceTeaser__Image">
|
||||||
|
<img class="LP-Image" src="{{ place.images.first.filename.thumbnail.url}}" />
|
||||||
|
</div>
|
||||||
|
<div class="LP-PlaceTeaser__Meta">
|
||||||
|
<div class="LP-PlaceTeaser__Info">
|
||||||
|
<span class="LP-PlaceTeaser__Title">
|
||||||
|
<h1 class="LP-Headline LP-Headline--teaser">{{place.name|truncatechars:19}}</h1>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock maincontent %}
|
@ -31,7 +31,7 @@ class HomeView(IsAuthenticated, View):
|
|||||||
return render(request, 'home.html', context)
|
return render(request, 'home.html', context)
|
||||||
|
|
||||||
def handle_no_permission(self):
|
def handle_no_permission(self):
|
||||||
place_list = Place.objects.all().order_by('-submitted_when')[:10]
|
place_list = Place.objects.all().order_by('-submitted_when')[:5]
|
||||||
context = {
|
context = {
|
||||||
'place_list': place_list
|
'place_list': place_list
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user