Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的模型中有一个数字字段如果该字段为负,则为借方,如果为正,则为贷方现在用户必须始终输入正数,然后选择贷方或借方将数据保存到相应字段时,分配符号用户不应该输入负数如何创建自定义小部件来实现这一点,以便我可以在 ModelForm 中使用它