Only visible projects in Project model, not Group model.
This commit is contained in:
parent
00d715270f
commit
26811f914c
|
@ -22,8 +22,7 @@ class ListView(View):
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'section': self.section,
|
'section': self.section,
|
||||||
'groups': models.Group.objects.filter(
|
'groups': models.Group.objects.all().order_by('order'),
|
||||||
visible=True).order_by('order'),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
context = RequestContext(request, data)
|
context = RequestContext(request, data)
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% for grp in groups %}
|
{% for grp in groups %}
|
||||||
<h2 id="{{ grp.slug }}">{{ grp.name }}</h2>
|
<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>
|
<div class="project-papers" data-toggle-on-click>
|
||||||
<h4 class="date"><i class="fa fa-calendar"></i> {{ project.date|date('F Y') }}</h4>
|
<h4 class="date"><i class="fa fa-calendar"></i> {{ project.date|date('F Y') }}</h4>
|
||||||
<h3 class="title">{{ project.title }}</h3>
|
<h3 class="title">{{ project.title }}</h3>
|
||||||
|
|
Loading…
Reference in New Issue