Skip to content
Snippets Groups Projects
Commit bba0fc49 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Get the projects in a more efficient manner

parent 106e642f
No related branches found
No related tags found
No related merge requests found
......@@ -156,7 +156,7 @@ class ProjectIndexPage(BasePage):
def get_context(self, request, *args, **kwargs):
context = super().get_context(request, *args, **kwargs)
subpages = self.get_children().live()
subpages = ProjectPage.objects.descendant_of(self).live().public().select_related('icon')
per_page = settings.DEFAULT_PER_PAGE
page_number = request.GET.get('page')
paginator = Paginator(subpages, per_page)
......
......@@ -10,7 +10,7 @@
<div class="wrapper wrapper--listings">
{% if subpages.object_list.exists %}
{% for subpage in subpages.object_list.specific %}
{% for subpage in subpages.object_list %}
<a class="listing" href="{% pageurl subpage %}">
{% if subpage.icon %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment