0

我试图弄清楚如何使用 django-crispy-forms 在 django 中将“选择”元素的空值设置为“选择您的位置”而不是“--------”。有没有人对最好的方法有任何建议?

谢谢

4

1 回答 1

0

Turns out since I was using choices in a CharField, I could just add a default blank value with my label and set blank=False on my model. The answer is documented here, but it's somewhat hidden in the question, which is about ForeignKeys.

于 2013-04-18T18:07:56.727 回答