[Django]-Django.core.exceptions.FieldError: Unknown field(s) (y, b, d, o)

11👍

the fields attribute is expecting a list or tuple. it finds a string, which is also iterable, but iterating through a string yields each character.

try

fields = ('body', )

this is a fairly common case, and the exact error depends on your string, so is hard to google. the hint is the list of fields (did you possibly change the order of the characters?)

Unknown fields b, o, d, y

notice how they are all one character, and spell out what looks like a string value from your code

👤second

Leave a comment