blob: 2aebf5f8a132ebc177e3026e229f1c16b4602163 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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}
}
|