I'm a newer to Python, and I am having a problem with Django's forms:
args="[('job_201404181748_1712666','job_201404181748_1712666')]"
jobid = forms.ChoiceField(choices=args)
This raised ValueError: need more than 1 value to unpack
. If I replace args
with a string, then it works ok:
jobid = forms.ChoiceField(choices=[('job_201404181748_1712666','job_201404181748_1712666')])
I don't know why. Can anyone help?