Change whitelist to a CharField. TextField could never work if you used the second line because of '\n'