Add better plugin description + new example plugin

Add better plugin description + new example plugin
This commit is contained in:
Master3395
2025-09-11 20:04:09 +02:00
parent 41ead838ef
commit dfbbccf073
15 changed files with 3801 additions and 0 deletions

20
testPlugin/admin.py Normal file
View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import TestPluginSettings, TestPluginLog
@admin.register(TestPluginSettings)
class TestPluginSettingsAdmin(admin.ModelAdmin):
list_display = ['user', 'plugin_enabled', 'test_count', 'last_test_time']
list_filter = ['plugin_enabled', 'last_test_time']
search_fields = ['user__username', 'custom_message']
readonly_fields = ['last_test_time']
@admin.register(TestPluginLog)
class TestPluginLogAdmin(admin.ModelAdmin):
list_display = ['timestamp', 'action', 'message', 'user']
list_filter = ['action', 'timestamp', 'user']
search_fields = ['action', 'message', 'user__username']
readonly_fields = ['timestamp']
date_hierarchy = 'timestamp'