SoFunction
Updated on 2024-11-21

django form to achieve the drop-down box example explains

Method I:

queue = (label=u'Queue',queryset=())

Method II:

 class ServerForm():
 queue = (label=u'Queue')
 def __init__(self,*args,**kwargs):
  super(ServerForm,self).__init__(*args,**kwargs)
  ['queue'].choices=((,) for x in ())

Attention:In the Queue model's __unicode__() function return the fields you need to display in your dropdown menu

Above this django form to achieve the drop-down box example to explain is all I have shared with you, I hope to give you a reference, and I hope you support me more.