I'm creating a Custom User Model, based on AbstractUser, which has several extra fields added. I've read through the documentation and assorted examples, but I'm having a couple of frustrating (and probably simple) issues
I'm adding some extra fields to the user and the admin, for later group validation. I'm trying to add the custom fields to the Custom UserCreationForm and UserChangeForm, and I'm using Class Meta: to try and add my new fields in while including the existing ones using the form class CustomUserCreationForm(UserCreationForm):
class Meta(UserCreationForm):
model = CustomUser
fields = UserCreationForm.Meta.fields + ('character_name' ,'ritual_points', 'contribute_points',)
class CustomUserChangeForm(UserChangeForm):
class Meta(UserChangeForm):
model = CustomUser
fields = UserChangeForm.Meta.fields + ('character_name', 'ritual_points', 'contribute_points',)
Which according to all the examples I've seen should just work. However, every time i try and make the migrations, it throws a strop
TypeError: Can't convert 'tuple' object to str implicitly
Everything I've read suggests this should work without any issues.
EDIT The plot thickens. I applied an earlier answer to change the () to a list [] to convert he fields to list, and it came back with a different answer:
TypeError: Can't convert 'list' object to str implicitly
Interestingly, this is working without any problems for the CustomUserCreationForm (which gives a different error if I try and change the () to [], but CustomUserChangeForm is throwing the error.