Hi, it looks like the issue is with user creation. You should be using User.objects.create_user(...) and not User.objects.create(...): https://docs.djangoproject.com/en/5.0/ref/contrib/auth/#django.contrib.auth.models.UserManager.create_user
#Testing: `Client.login()` can't login to user.
3 messages · Page 1 of 1 (latest)
(this is because create() expects the password you give it to be hashed/encrypted, whereas create_user() will hash/encrypt the password automatically for you (which is usually what you want)
yes but when i try to create it this happens
self.user = User.objects.create_user(email='[email protected]', password='T@st123', is_associate=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: UserManager.create_user() missing 1 required positional argument: 'username'