2👍
✅
That’s not at all how you use managers. You never instantiate them yourself outside of the model definition; you access them via the model itself.
if form.is_valid():
user = CustomUser.objects.create_user(
form.cleaned_data['identifier'],
form.cleaned_data['password'],
form.cleaned_data['email'],
form.cleaned_data['full_name'],
form.cleaned_data['date_of_birth'],
)
Source:stackexchange.com