Hello, I have a question regarding Djanog views
here is a sample code
def example register ( request ) :
if request.method == ’POST ’ :
username = request.POST.get ( ’ username ’ )
password = request.POST.get ( ’ password ’ )
email = request.POST.get (’email’)
user = User.objects .create_user ( username
, email
, password )
user . save ()
return HttpResponseRedirect (
’/ example /login / ’)
In the above example we are taking the values one by one i.e username, password etc. If I have many such fields, then how can I do it in one single line, i was thinking to use dict's but can not find a way. Any help is appreciated. Thank you.