Changeset 9778 for src/django_gheat/wlheatmap
- Timestamp:
- Dec 14, 2011, 6:51:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/wlheatmap/filters.py
r9650 r9778 2 2 # 3 3 # View serving filter values. 4 5 4 from django.core.management import setup_environ 6 5 from django.http import HttpResponse … … 13 12 result = [] 14 13 meetrondje_list_total = list() 14 all_ssids = set() 15 15 for user in Gebruiker.objects.all().order_by('naam'): 16 16 entry = {'gebruiker' : user.naam} … … 33 33 } 34 34 ) 35 36 # Hack to gather totals, used for the ``all'' filter 37 meetrondje_list_total += meetrondje_list 38 all_ssids |= sum_ssid 39 35 40 meetrondje_list = [{ 'naam' : 'all', 'datum' : 'any', 'nodes' : ['all'] + sorted(sum_ssid) }] + meetrondje_list 36 meetrondje_list_total += meetrondje_list37 41 entry['meetrondje'] = meetrondje_list 38 42 result.append(entry) 43 44 # Hack the ``all'' user filter in the results 45 meetrondje_list_total = [{'naam' : 'all', 'datum' : 'any', 'nodes' : ['all'] + sorted(all_ssids)}] + sorted(meetrondje_list_total, key=lambda x: x['naam']) 39 46 result = [ {'gebruiker' : 'all', 'meetrondje' : meetrondje_list_total} ] + result 40 47
Note:
See TracChangeset
for help on using the changeset viewer.