added pagination with django-endless-pagination

pull/1/head
Ed Summers 2011-11-17 23:09:23 -05:00
parent 8cc00f7aea
commit 6a9a213632
6 changed files with 50 additions and 1 deletions

View File

@ -1,4 +1,5 @@
{% extends "base.html" %}
{% load endless %}
{% block title %} — {{ supporter.username }}{% endblock %}
@ -231,7 +232,8 @@ how do I integrate the your wishlist thing with the tabs thing?
Nudge, nudge, say no more.
{% endifequal %}
{% else %}
{% for work in wishlist.works.all %}
{% paginate 20 works %}
{% for work in works %}
<!-- classify which tab depending on work.last_campaign_status -->
{% if work.last_campaign_status == 'SUCCESSFUL' %}
<div class="listview tabs tabs-1">
@ -350,6 +352,11 @@ how do I integrate the your wishlist thing with the tabs thing?
</div>
</div>
{% endfor %}
<br>
<hr>
<div class="pagination content-block-heading">
{% show_pages %}
</div>
{% endifequal %}
</div>
</div>

View File

@ -160,6 +160,7 @@ def rh_admin(request):
def supporter(request, supporter_username, template_name):
supporter = get_object_or_404(User, username=supporter_username)
wishlist = supporter.wishlist
works = wishlist.works.all()
backed = 0
backing = 0
transet = Transaction.objects.all().filter(user = supporter)
@ -238,6 +239,7 @@ def supporter(request, supporter_username, template_name):
context = {
"supporter": supporter,
"wishlist": wishlist,
"works": works,
"backed": backed,
"backing": backing,
"wished": wished,

View File

@ -16,3 +16,4 @@ oauth2
mechanize
pyzotero
freebase
django-endless-pagination

View File

@ -108,6 +108,7 @@ INSTALLED_APPS = (
'social_auth',
'tastypie',
'djcelery',
'endless_pagination',
)
# A sample logging configuration. The only tangible logging

View File

@ -296,3 +296,21 @@ div.content-block-content .cols3 .column {
#footer .column li a {
color: #6994a3;
}
.pagination {
width: 100%;
text-align: center;
margin-top: 20px;
}
.pagination .endless_page_link {
font-size: 16pt;
border: thin #eeeeee solid;
font-weight: normal;
margin: 5px;
}
.pagination .endless_page_current {
font-size: 16pt;
border: thin #eeeeee solid;
font-weight: normal;
margin: 5px;
background-color: #edf3f4;
}

View File

@ -316,3 +316,23 @@ div.content-block-content {
}
}
}
.pagination {
width: 100%;
text-align: center;
margin-top: 20px;
.endless_page_link {
font-size: 16pt;
border: thin #eeeeee solid;
font-weight: normal;
margin: 5px;
}
.endless_page_current {
font-size: 16pt;
border: thin #eeeeee solid;
font-weight: normal;
margin: 5px;
background-color:@pale-blue;
}
}