From b95e565bef30cfb958b933dded9fbe276fd66f96 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Wed, 2 Sep 2020 00:26:03 +0200 Subject: [PATCH] Stripped down unauth_home template, limited places to 5. --- .../lostplaces_app/templates/home_unauth.html | 31 +++++++++++++++++++ lostplaces/lostplaces_app/views/views.py | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 lostplaces/lostplaces_app/templates/home_unauth.html diff --git a/lostplaces/lostplaces_app/templates/home_unauth.html b/lostplaces/lostplaces_app/templates/home_unauth.html new file mode 100644 index 0000000..9c6054e --- /dev/null +++ b/lostplaces/lostplaces_app/templates/home_unauth.html @@ -0,0 +1,31 @@ +{% extends 'global.html'%} + +# {% block title %}Start{% endblock %} + +{% block maincontent %} + +
+

Our latest locations

+ +
+ +{% endblock maincontent %} \ No newline at end of file diff --git a/lostplaces/lostplaces_app/views/views.py b/lostplaces/lostplaces_app/views/views.py index 552ca7a..030b21c 100644 --- a/lostplaces/lostplaces_app/views/views.py +++ b/lostplaces/lostplaces_app/views/views.py @@ -31,7 +31,7 @@ class HomeView(IsAuthenticated, View): return render(request, 'home.html', context) 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 = { 'place_list': place_list }