<commit_before># -*- coding:utf-8 -*-
from django.contrib import admin
from models import Team, Project, ProjectMember, Interface, MetaData, ErrorCode, LockInfo, EditHistory


class TeamAdmin(admin.ModelAdmin):
    search_fields = ('id', 'team_name')
    list_display = ('id', 'team_name', 'description', 'pic_url', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class ProjectAdmin(admin.ModelAdmin):
    search_fields = ('id', 'project_name')
    list_display = ('id', 'team', 'project_name', 'description', 'pic_url', 'host', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class ProjectMemberAdmin(admin.ModelAdmin):
    search_fields = ('id',)
    list_display = ('id', 'project', 'user', 'role', 'author', 'modifier', 'is_active', 'is_deleted', 'ctime', 'utime',)


class InterfaceAdmin(admin.ModelAdmin):
    search_fields = ('id', 'interface_name')
    list_display = ('id', 'project', 'interface_name', 'description', 'url', 'method', 'content_type', 'tags', 'mockdata', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class MetaDataAdmin(admin.ModelAdmin):
    search_fields = ('id',)
    list_display = ('id', 'interface', 'position', 'metadata_name', 'data', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class ErrorCodeAdmin(admin.ModelAdmin):
    search_fields = ('id', 'error_name')
    list_display = ('id', 'interface', 'error_name', 'display_message', 'description', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class LockInfoAdmin(admin.ModelAdmin):
    search_fields = ('id', )
    list_display = ('id', 'interface', 'lock_user', 'is_locked', 'is_deleted', 'ctime', 'utime',)


class EditHistoryAdmin(admin.ModelAdmin):
    search_fields = ('id', )
    list_display = ('id', 'interface', 'modifier', 'content', 'is_deleted', 'ctime', 'utime',)


admin.site.register(Team, TeamAdmin)
admin.site.register(Project, ProjectAdmin)
admin.site.register(ProjectMember, ProjectMemberAdmin)
admin.site.register(Interface, InterfaceAdmin)
admin.site.register(MetaData, MetaDataAdmin)
admin.site.register(ErrorCode, ErrorCodeAdmin)
admin.site.register(LockInfo, LockInfoAdmin)
admin.site.register(EditHistory, EditHistoryAdmin)<commit_msg>update admin.py<commit_after># -*- coding:utf-8 -*-
from django.contrib import admin
from models import Team, Project, ProjectMember, Interface, MetaData, ErrorCode, LockInfo, EditHistory


class TeamAdmin(admin.ModelAdmin):
    search_fields = ('id', 'team_name')
    list_display = ('id', 'team_name', 'description', 'pic_url', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class ProjectAdmin(admin.ModelAdmin):
    search_fields = ('id', 'project_name')
    list_filter = ('team', 'author', 'modifier', 'is_active',)
    list_display = ('id', 'team', 'project_name', 'description', 'pic_url', 'host', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class ProjectMemberAdmin(admin.ModelAdmin):
    search_fields = ('id',)
    list_filter = ('project', 'user', 'role', 'author', 'modifier',)
    list_display = ('id', 'project', 'user', 'role', 'author', 'modifier', 'is_active', 'is_deleted', 'ctime', 'utime',)


class InterfaceAdmin(admin.ModelAdmin):
    search_fields = ('id', 'interface_name')
    list_filter = ('project',)
    list_display = ('id', 'project', 'interface_name', 'description', 'url', 'method', 'content_type', 'tags', 'mockdata', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class MetaDataAdmin(admin.ModelAdmin):
    search_fields = ('id',)
    list_filter = ('interface', 'position', 'author', 'modifier', 'is_active',)
    list_display = ('id', 'interface', 'position', 'metadata_name', 'data', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class ErrorCodeAdmin(admin.ModelAdmin):
    search_fields = ('id', 'error_name')
    list_filter = ('interface', 'author', 'modifier', 'is_active',)
    list_display = ('id', 'interface', 'error_name', 'display_message', 'description', 'remark', 'is_active', 'is_deleted', 'author', 'modifier', 'ctime', 'utime',)


class LockInfoAdmin(admin.ModelAdmin):
    search_fields = ('id', )
    list_filter = ('interface', 'lock_user', 'is_locked',)
    list_display = ('id', 'interface', 'lock_user', 'is_locked', 'is_deleted', 'ctime', 'utime',)


class EditHistoryAdmin(admin.ModelAdmin):
    search_fields = ('id', )
    list_filter = ('interface', 'modifier',)
    list_display = ('id', 'interface', 'modifier', 'content', 'is_deleted', 'ctime', 'utime',)


admin.site.register(Team, TeamAdmin)
admin.site.register(Project, ProjectAdmin)
admin.site.register(ProjectMember, ProjectMemberAdmin)
admin.site.register(Interface, InterfaceAdmin)
admin.site.register(MetaData, MetaDataAdmin)
admin.site.register(ErrorCode, ErrorCodeAdmin)
admin.site.register(LockInfo, LockInfoAdmin)
admin.site.register(EditHistory, EditHistoryAdmin)
{'fraction_non_alphanumeric': 0.1916286451100972, 'fraction_numerical': 0.00039674667724657806, 'mean_word_length': 6.627836611195159, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4637102', 'n_tokens_mistral': 1634, 'n_tokens_neox': 1628, 'n_words': 361}