Merge pull request #774 from ae-utbm/fix-operation-logs

Fix operation logs
This commit is contained in:
thomas girod
2024-08-10 10:33:39 +02:00
committed by GitHub
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.
# #
# #