diff options
author | prathamesh | 2017-11-13 17:30:15 +0530 |
---|---|---|
committer | prathamesh | 2017-11-13 17:30:15 +0530 |
commit | 53ca24ea3eaf0e82cfa6e7c4614e200ef5b610e0 (patch) | |
tree | 2e86440ec827fc37bc54118effbe8ae19a0043c7 /yaksh/views.py | |
parent | a3a94ded76f02820b3a1536055dad0dc2dac81c5 (diff) | |
download | online_test-53ca24ea3eaf0e82cfa6e7c4614e200ef5b610e0.tar.gz online_test-53ca24ea3eaf0e82cfa6e7c4614e200ef5b610e0.tar.bz2 online_test-53ca24ea3eaf0e82cfa6e7c4614e200ef5b610e0.zip |
set_password to convert into hash
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index d49fad1..8d965f1 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1910,14 +1910,16 @@ def _read_user_csv(reader, course): upload_details.append("{0} -- {1} not added to course".format( counter, user)) continue - user_defaults = {'password': password, 'email': email, - 'first_name': first_name, 'last_name': last_name} + user_defaults = {'email': email, 'first_name': first_name, + 'last_name': last_name} user, created = _create_or_update_user(username, user_defaults) profile_defaults = {'institute': institute, 'roll_number': roll_no, 'department': department, 'is_email_verified': True} _create_or_update_profile(user, profile_defaults) if created: state = "Added" + user.set_password(password) + user.save() course.students.add(user) else: state = "Updated" |