[SCM] Code for the Debian Games Parties branch, master, updated. 3ac4b60616654da286ddc741c653cf7d4e41a7f2
Paul Wise
pabs at debian.org
Fri Jul 30 21:38:21 UTC 2010
The following commit has been merged in the master branch:
commit 3ac4b60616654da286ddc741c653cf7d4e41a7f2
Author: Paul Wise <pabs at debian.org>
Date: Fri Jul 30 17:35:23 2010 -0400
List claimed packages at the top of the page.
diff --git a/screenshots/templates/page.html b/screenshots/templates/page.html
index 82d7b17..0bd333c 100644
--- a/screenshots/templates/page.html
+++ b/screenshots/templates/page.html
@@ -29,6 +29,8 @@
</p>
</form>
+ {% if claim_packages %}Claimed packages: {{ claim_packages|join:" " }}{% endif %}
+
<br clear="left"/>
{% block content %}{% endblock %}
diff --git a/screenshots/views.py b/screenshots/views.py
index 7d05339..30843ea 100644
--- a/screenshots/views.py
+++ b/screenshots/views.py
@@ -25,7 +25,9 @@ def index(request, page=1):
p.screenshots = p.screenshot_set.all().order_by('-version')
p.claim_old = p.claim_nick and (p.claim_time-datetime.now()) >= timedelta(seconds=30)
- return render_to_response('index.html', {'packages': packages, 'irc_nick': irc_nick, 'pagination': packages})
+ claim_packages = Package.objects.filter(claim_nick__iexact=irc_nick).order_by('name').values_list('name',flat=True)
+
+ return render_to_response('index.html', {'packages': packages, 'irc_nick': irc_nick, 'claim_packages': claim_packages, 'pagination': packages})
--
Code for the Debian Games Parties
More information about the Pkg-games-commits
mailing list