1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

configure_user() moved from class MyRemoteUserBackend to class UserAttributes, as static factory.

call configure_user() while adding user from form
This commit is contained in:
Ing. Jan KRCMAR 2017-07-18 15:04:56 +02:00
parent f2e1273f85
commit b095a77da5
3 changed files with 31 additions and 18 deletions

View file

@ -88,6 +88,7 @@ def accounts(request):
if not error_messages:
new_user = User.objects.create_user(data['name'], None, data['password'])
new_user.save()
UserAttributes.configure_user(new_user)
return HttpResponseRedirect(request.get_full_path())
if 'edit' in request.POST:
user_id = request.POST.get('user_id', '')