Only visible projects in Project model, not Group model.

This commit is contained in:
Felipe Martín 2015-03-22 15:44:39 +01:00
parent 00d715270f
commit 26811f914c
2 changed files with 2 additions and 3 deletions

View File

@ -22,8 +22,7 @@ class ListView(View):
data = {
'section': self.section,
'groups': models.Group.objects.filter(
visible=True).order_by('order'),
'groups': models.Group.objects.all().order_by('order'),
}
context = RequestContext(request, data)

View File

@ -11,7 +11,7 @@
{% block content %}
{% for grp in groups %}
<h2 id="{{ grp.slug }}">{{ grp.name }}</h2>
{% for project in grp.projects.all().order_by('-date') %}
{% for project in grp.projects.filter(visible=True).order_by('-date') %}
<div class="project-papers" data-toggle-on-click>
<h4 class="date"><i class="fa fa-calendar"></i> {{ project.date|date('F Y') }}</h4>
<h3 class="title">{{ project.title }}</h3>