26 lines
734 B
Python
26 lines
734 B
Python
|
|
from django.contrib import admin
|
||
|
|
from .models import SystemSettings, OperationLog
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(SystemSettings)
|
||
|
|
class SystemSettingsAdmin(admin.ModelAdmin):
|
||
|
|
list_display = (
|
||
|
|
'goedge_base_url',
|
||
|
|
'admin_access_key_id',
|
||
|
|
'default_node_cluster_id',
|
||
|
|
'edge_access_token',
|
||
|
|
'edge_token_expires_at',
|
||
|
|
'default_free_traffic_gb_per_domain',
|
||
|
|
'cname_template',
|
||
|
|
'updated_at',
|
||
|
|
)
|
||
|
|
readonly_fields = ('edge_access_token', 'edge_token_expires_at')
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(OperationLog)
|
||
|
|
class OperationLogAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ('actor', 'action', 'target', 'created_at')
|
||
|
|
search_fields = ('actor__username', 'action', 'target')
|
||
|
|
|
||
|
|
# Register your models here.
|