Question

I want to show only one field of a model though a modelform, I tried just putting that field in the fields list, but it crashes like this http://i1.imageban.ru/out/2011/03/18/f5b78d2a2351a1adeec3c8d2f5452859.png , if I add any other field it works fine, someone knows why that is?

Was it helpful?

Solution

Show us some code, but looks like you did not put fields as a list e.g. you did

fields = my_field_name

instead you need to do this

field = (my_field_name,)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top