Is it my admin.py or
Yes, the error is in admin.py.
But which Class is that message telling you that the error is in?
class ProfileAdmin(admin.ModelAdmin):
search_fields = ['full_name', 'user_username']
list_display = ['username', 'user', 'verified']```
Good!
Now which variable of this class is it saying the error is in?
(Side note: The three backticks at the end also need to be on a line by themselves. It can’t be the end of the last line of the code.)
'user_username']
I’m asking for the variable in the class here.
You have two variables defined, search_fields
and list_display
. Which one of these is causing the error?
list_display = ['username', 'user', 'verified']
To clarify, list_display
is the variable. The list on the right side of the assignment operator is the value for that variable.
So finally, which value in that list is it saying is in error?
username has to be change
Does username
exist within Profile
?
no it has to be fullname
list_display = ['full_name', 'user', 'verified']
it works thanks daddy