From 20e8854467789a6a2332fa41f20f8cc253c2edc8 Mon Sep 17 00:00:00 2001 From: Sli Date: Fri, 9 Aug 2024 14:05:09 +0200 Subject: [PATCH] Fix operation logs --- core/admin.py | 9 ++++++++- counter/{app.py => apps.py} | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) rename counter/{app.py => apps.py} (92%) diff --git a/core/admin.py b/core/admin.py index c17f494b..e8436db0 100644 --- a/core/admin.py +++ b/core/admin.py @@ -16,7 +16,7 @@ from django.contrib import admin from django.contrib.auth.models import Group as AuthGroup -from core.models import Group, Page, SithFile, User +from core.models import Group, OperationLog, Page, SithFile, User admin.site.unregister(AuthGroup) @@ -53,3 +53,10 @@ class SithFileAdmin(admin.ModelAdmin): list_display = ("name", "owner", "size", "date", "is_in_sas") autocomplete_fields = ("parent", "owner", "moderator") search_fields = ("name", "parent__name") + + +@admin.register(OperationLog) +class OperationLogAdmin(admin.ModelAdmin): + list_display = ("label", "operator", "operation_type", "date") + search_fields = ("label", "date", "operation_type") + autocomplete_fields = ("operator",) diff --git a/counter/app.py b/counter/apps.py similarity index 92% rename from counter/app.py rename to counter/apps.py index 47c81a01..54e7ad4c 100644 --- a/counter/app.py +++ b/counter/apps.py @@ -16,7 +16,7 @@ # details. # # You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA. # #