摘要:
models.py forms.py views.py index.html 点击提交: 阅读全文
摘要:
class StudentForms(forms.ModelForm): formats=[ '%Y-%m-%d', '%m/%d/%Y', ] birthday = forms.DateField(label='出生日期', input_formats=formats) class Meta: m 阅读全文
摘要:
{{title}} 这是主界面--> {{fo... 阅读全文
摘要:
要注意是模板元素 和 表单元素的对应。 阅读全文
摘要:
models.py-->forms.py-->views.py(get)--index.html-->views.py(post)-->home.html urls.py models.py forms.py views.py index.html home.html 阅读全文
摘要:
urls.py forms.py views.py index.html home.html index界面: 输入相应信息,点击提交,信息会传到home界面,并显示 阅读全文
摘要:
1.在book app目录下新建一个forms.py,并加入 urls.py配置路径: views.py中配置视图: index.html 具体页面: 我们只测试接受birthday:注意输入的日期格式。 阅读全文