Changeset 9674 for src/django_gheat/wlheatmap/__init__.py
- Timestamp:
- Sep 7, 2011, 8:06:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/wlheatmap/__init__.py
r9661 r9674 39 39 from django.core.files.base import ContentFile 40 40 41 def get_apperatuur_choices(item): 42 return sorted(set(Apparatuur.objects.values_list(item,item))) 43 41 44 class MeetBestandForm(forms.Form): 42 45 naam = forms.ChoiceField(choices=Gebruiker.objects.values_list('naam','naam')) 43 kaart = forms.ChoiceField(choices= set(Apparatuur.objects.values_list('kaart','kaart')))44 antenne = forms.ChoiceField(choices= set(Apparatuur.objects.values_list('antenne','antenne')))46 kaart = forms.ChoiceField(choices=get_apperatuur_choices('kaart')) 47 antenne = forms.ChoiceField(choices=get_apperatuur_choices('antenne')) 45 48 bestand = forms.FileField() 46 49 … … 66 69 else: 67 70 return HttpResponseServerError('ERROR File does already exists') 68 71 else: 72 return HttpResponseServerError('ERROR No valid input') 69 73 else: 70 74 form = MeetBestandForm()
Note:
See TracChangeset
for help on using the changeset viewer.