Could not go through all your attachments but just reviewed few line of your models.py...
just my two cents... If you are going to use email for your login then USERNAME_FIELD should carry email not username... USERNAME_FIELD = 'email' On Wednesday, September 16, 2020 at 5:02:35 PM UTC-4 johnre...@gmail.com wrote: > In my project I have two apps. Both of these apps require the *email* > field not to be blank and one of those apps doesn't need the *first_name* > and the *last_name* fields, so I decided to override the default *User* > class available from *django.contrib.auth.models*. I did it following this > <https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#auth-custom-user> > > guide. > > Here you can find the models.py <https://dpaste.org/pZV9> file for the > app where my new User class is defined, as well as the settings.py > <https://dpaste.org/tS8R> code for my overall project (in the end of the > file I define *AUTH_USER_MODEL*). As the guide I linked in the above > paragraph suggests, I modified the admin.py <https://dpaste.org/QABt> > file as well. > > I updated the models.py <https://dpaste.org/wwhp> file of my other app to > use the project-wide *AUTH_USER_MODEL* as well. > > However, when I try to add a new user via the admin interface, I get an > error saying *FieldError at /admin/employers/user/8/change/ Unknown > field(s) (first_name, last_name) specified for User. Check > fields/fieldsets/exclude attributes of class UserAdmin*. Here's the > traceback: https://dpaste.org/osxj > > I'm not sure what is going wrong here. I followed the guide here > <https://docs.djangoproject.com/en/3.0/topics/auth/customizing/> in its > entirety (you can see that from my admin.py file), but I still get the > error. *What is going on here? How do I fix this error?* > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7005e5d0-367a-45e7-8650-5d95dae4a4d0n%40googlegroups.com.