should be a view for coming-soon campaigns

pull/1/head
Andromeda Yelton 2013-06-05 15:08:29 -04:00
parent 6dbdc243e3
commit b98a36d8e8
2 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,7 @@ function put_un_in_cookie2(){
{% include "book_panel.html" %}
{% endwith %}{% endwith %}{% endwith %}
{% endfor %}
<a class="more_featured_books" href="{% url campaign_list 'ending' %}"></a>
<a class="more_featured_books" href="{% url campaign_list 'soon' %}"></a>
</div>
{% endif %}{% endif %}
<div class="spacer"></div>

View File

@ -740,6 +740,8 @@ class CampaignListView(FilterableListView):
return models.Campaign.objects.filter(status='ACTIVE').all() # STUB: will need to make db changes to make this work
elif (facet == 'ending'):
return models.Campaign.objects.filter(status='ACTIVE').order_by('deadline')
elif (facet == 'soon'):
return models.Campaign.objects.filter(status='INITIALIZED').order_by('-work__num_wishes')
else:
return models.Campaign.objects.all()