Closed princekhunt closed 3 months ago
In the anonymous direct login function, .create function is used.
user = User.objects.create_user(username=username, email=email, password=password) user_type_obj = user_type.objects.create(user=user, type="Anonymous") profile = UserProfile.objects.create(email=email, name=username, username=username)
Here, there is no requirement of defining variables (user, user_type_obj and profile).
https://github.com/princekhunt/privateping/blob/e48877c70e9dfd0132847ade7d8aa665f790fbba/registration/views.py#L167
In the anonymous direct login function, .create function is used.
user = User.objects.create_user(username=username, email=email, password=password) user_type_obj = user_type.objects.create(user=user, type="Anonymous") profile = UserProfile.objects.create(email=email, name=username, username=username)
Here, there is no requirement of defining variables (user, user_type_obj and profile).
https://github.com/princekhunt/privateping/blob/e48877c70e9dfd0132847ade7d8aa665f790fbba/registration/views.py#L167