Problems with the Django Admin. Doesn't show Users section

Viewed 378

Can anyone tell me why is it that I don't see the "Users" section within Authentication and Authorization?enter image description here

If you need more code, please let me know.

I honestly don't know what happened, always in all my Django projects, when I create the Superuser and enter the url '/ admin', there is the Users section. I don't know what could be wrong.

I appreciate your help ♥

models.py

from django.db import models
from django.db.models import Count
from django.contrib.auth.models import User
from django.contrib.auth.models import AbstractUser
from django.db.models.signals import post_save
from django.dispatch import receiver

terminal log

[11/Jul/2021 02:18:44] "GET / HTTP/1.1" 200 6606
[11/Jul/2021 02:18:48] "GET /admin/ HTTP/1.1" 302 0
[11/Jul/2021 02:18:49] "GET /admin/login/?next=/admin/ HTTP/1.1" 200 2267
[11/Jul/2021 02:18:57] "POST /admin/login/?next=/admin/ HTTP/1.1" 302 0
[11/Jul/2021 02:18:57] "GET /admin/ HTTP/1.1" 200 5483
[11/Jul/2021 02:19:13] "GET /admin/auth/ HTTP/1.1" 200 2910

admin.py

from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from cerveceria.models import *
1 Answers

in admin.py:

from django.contrib import admin
from django.contrib.auth import get_user_model


admin.site.unregister(get_user_model())
admin.site.register(get_user_model())
Related