--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project/kiwipycon/context_processors.py Fri Oct 30 15:09:12 2009 +0530
@@ -0,0 +1,17 @@
+from datetime import datetime
+
+from django.conf import settings
+
+from project.kiwipycon.sponsor.models import Sponsor
+
+def sponsors(request):
+ sponsors = Sponsor.objects.all()
+ gold_sponsors = sponsors.filter(type='gold')
+ silver_sponsors = sponsors.filter(type='silver')
+ schwag_sponsors = sponsors.filter(type='schwag')
+ return {
+ 'sponsors': {'gold': gold_sponsors,
+ 'silver': silver_sponsors,
+ 'schwag': schwag_sponsors}
+ }
+