Changes between Initial Version and Version 2 of Ticket #30034
- Timestamp:
- Dec 13, 2018, 1:00:07 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30034
- Property Resolution → needsinfo
- Property Status new → closed
-
Ticket #30034 – Description
initial v2 1 Hi all;1 Hi; 2 2 3 Logs are listed wrongly at list records on page (list_display - change_list.html). 3 This is my admin.py in custom application. 4 4 5 For example; 6 Wrong user (username:muslu) in **/admin/admin/logentry/** 7 True user (username:admin) in **/admin/admin/logentry/1/change/** 8 5 admin.py: 9 6 10 7 {{{ 8 9 from django.contrib.admin.models import LogEntry 10 11 11 class LogEntryAdmin(admin.ModelAdmin): 12 list_display = ['content_type', 'user', 'object_repr', 'action_time'] 12 list_display = ['content_type', 'user', 'object_id', 'object_repr', 'action_time'] 13 date_hierarchy = 'action_time' 13 14 list_filter = ['user', 'content_type'] 15 ordering = ['-action_time'] 16 17 def has_add_permission(self, request): 18 return False 19 20 def has_change_permission(self, request, obj=None): 21 return False 22 23 def has_delete_permission(self, request, obj=None): 24 return False 25 26 admin.site.register(LogEntry,LogEntryAdmin) 27 14 28 }}} 15 29 16 30 31 If I checked **/admin/app/model/1593/history/** and **/admin/admin/logentry/** on model's history, It's showing wrong user who changed record. 17 32 18 Django: 2.1.3 19 settings.AUTH_USER_MODEL: default 20 DATABASE_ROUTERS: at this system we are using 2 projects on different servers but we are accessing both project from one SQL server. So we use only one SQL user table. (Users are same for all projects.) (router.AuthRouter) 33 But when I entering **/admin/admin/logentry/2228/change/** then It's showing True user in page. 34 35 I added screen shots.