Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TheForm(forms.Form):
- h = Systemevents.objects.distinct('fromhost')
- l1 = []
- for i in h:
- l1.append(i.fromhost)
- l2 = l1
- l = zip(l1, l2)
- the_host = forms.ChoiceField(choices = l, label='select host')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement