django基础窗口form表单的运用 具体效果图如下: 首先确定表单中的数据集,先自己创建一个forms.py或者在原来的models.py中添加: 1代码如下 class ContactForm(forms.Form): CITY = [ ['TP','taibei'], ['TY','Taoyuang'], ['TC','Taichung'], ['TN','Tainan'], ['KS','Kaosiung'], ['NA','Others'] ] user_name = forms.C…