<!-- 这次用resultmap接收输出结果 --> <select id="findByName" parameterType="string" resultMap="customerMap"> select * from t_customer where c_name like concat('%', #{name},'%') order by c_ceroNo limit 0,100 </select>…
在ModelForm需要知道: from app03 import models from django.forms import ModelForm class UserForm(ModelForm): class Meta: model = models.UserInfo fields = "__all__" 它的内部找到类之后,如果 类里的字段是FK,就会自动生成ModelChoiceField 如果是M2M ,就会自动生成ModelMutilChoiceField…