根据我在小部件中传递的类attibute,django form.py文件中,密码字段没有反应

问题描述

用户名和电子邮件字段用于我上的课程, 但是密码字段没有使用我给的form-control类 我正在使用UserCreationForm中的django.contrib.auth.formdjano.contrib.auth.model

中的“用户”模型

widgets = {

        'username': TextInput(attrs={'class':'form-control'}),'email': TextInput(attrs={'class':'form-control'}),'password1': PasswordInput(attrs={'class':'form-control'}),'password2': PasswordInput(attrs={'class':'form-control'}),}

This is the output i am getting 但我需要密码字段来响应“表单控件”类

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)