Custom action doesn't show

Hi guys, I recently begin to collaborate in a project based in Django 4.1.3, and I was assigned a task that involves get some info about my custom user and send email to each one. I resolute this creating a custom admin action when the admin when needed execute this action to send to the users the info needed by them. The issue here is there no way to see my custom actions on the Admin Panel, I’ve trying but anything works, can you help me to know what I am missing?

example code:

from django.contrib import admin, messages
from .models import User


# custom admin action to send user info
@admin.action(description='Send emails to selected users')
def send_user_info(modeladmin, request, queryset):
    messages.success(request, "Emails sent successfully")

class UserAdmin(admin.ModelAdmin):
    actions = [send_user_info]
admin.site.register(User, UserAdmin)

Firstly, I tested the code you shared on Django version 5.0.7 and it works fine. Are you getting any errors? If so, can you share it? If possible, I would like to see the code that gives you an error.

Secondly, you can also try using the from django.contrib.auth.models import User code instead of the from .models import User code you shared.