Fix operation logs

This commit is contained in:
Antoine Bartuccio 2024-08-09 14:05:09 +02:00
parent f02864b752
commit 20e8854467
2 changed files with 9 additions and 2 deletions

View File

@ -16,7 +16,7 @@
from django.contrib import admin from django.contrib import admin
from django.contrib.auth.models import Group as AuthGroup 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) admin.site.unregister(AuthGroup)
@ -53,3 +53,10 @@ class SithFileAdmin(admin.ModelAdmin):
list_display = ("name", "owner", "size", "date", "is_in_sas") list_display = ("name", "owner", "size", "date", "is_in_sas")
autocomplete_fields = ("parent", "owner", "moderator") autocomplete_fields = ("parent", "owner", "moderator")
search_fields = ("name", "parent__name") 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",)

View File

@ -16,7 +16,7 @@
# details. # details.
# #
# You should have received a copy of the GNU General Public License along with # 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. # Place - Suite 330, Boston, MA 02111-1307, USA.
# #
# #