Advertisement
Guest User

forms.py

a guest
May 25th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. class TheForm(forms.Form):
  2. h = Systemevents.objects.distinct('fromhost')
  3. l1 = []
  4. for i in h:
  5. l1.append(i.fromhost)
  6. l2 = l1
  7. l = zip(l1, l2)
  8. the_host = forms.ChoiceField(choices = l, label='select host')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement