【发布时间】:2018-08-09 11:18:40
【问题描述】:
我正在尝试从 django 中的原始 html 表单中保存一些用户数据。
我的代码如下所示:
# This is the view -->
if request.method == 'POST':
name = request.POST['name']
email = request.POST['email']
age = request.POST['age']
password = request.POST['password']
# Some validation (But unnecessary for this Question)
# save the form into my user model
所以真正的问题是:如何将姓名、电子邮件、年龄和密码保存到我的数据库中?
【问题讨论】: