Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#30034 closed Bug (invalid)

Shows wrong user on list_display in LogEntryAdmin — at Version 2

Reported by: Muslu Y. Owned by: nobody
Component: contrib.admin Version: 2.1
Severity: Normal Keywords: logentry, logentryadmin, list_display, wrong user
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Muslu Y.)

Hi;

This is my admin.py in custom application.

admin.py:

from django.contrib.admin.models import LogEntry

class LogEntryAdmin(admin.ModelAdmin):
    list_display = ['content_type', 'user', 'object_id', 'object_repr', 'action_time']
    date_hierarchy = 'action_time'
    list_filter = ['user', 'content_type']
    ordering =  ['-action_time']

    def has_add_permission(self, request):
        return False

    def has_change_permission(self, request, obj=None):
        return False

    def has_delete_permission(self, request, obj=None):
        return False

admin.site.register(LogEntry,LogEntryAdmin)

If I checked /admin/app/model/1593/history/ and /admin/admin/logentry/ on model's history, It's showing wrong user who changed record.

But when I entering /admin/admin/logentry/2228/change/ then It's showing True user in page.

I added screen shots.

Change History (7)

comment:1 by Carlton Gibson, 6 years ago

Resolution: needsinfo
Status: newclosed

Hi.

You need to reduce this down to a minimal example showing Django is at fault.

There's really not enough info here for me to see what you issue could be. Without a reproduce it's hard to see how we could push this forward.

by Muslu Y., 6 years ago

by Muslu Y., 6 years ago

Attachment: admin_admin_logentry.png added

by Muslu Y., 6 years ago

comment:2 by Muslu Y., 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top