<commit_before>from django.contrib import admin
from backend.logger.models import HTTPRequest
from backend.logger.models import ErrorLogger


@admin.register(HTTPRequest)
class HTTPRequestAdmin(admin.ModelAdmin):
    change_list_template = 'admin/change_list_filter_sidebar.html'
    list_display = ['modified', 'ip', 'method', 'api_version', 'sha1']
    list_display_links = ['modified']
    list_filter = ['method', 'api_version', 'modified']
    search_fields = ['ip', 'sha1']
    ordering = ['-modified']
    list_per_page = 10


@admin.register(ErrorLogger)
class ErrorLoggerAdmin(admin.ModelAdmin):
    change_list_template = 'admin/change_list_filter_sidebar.html'
    list_display = ['added', 'http_request_sha1']
    list_display_links = ['http_request_sha1']
    list_filter = ['added']
    search_fields = ['^http_request_sha1', '^added']
    ordering = ['-modified']
    list_per_page = 10
<commit_msg>Import Export for HTTP request #time 5m<commit_after>from django.contrib import admin
from backend.logger.models import HTTPRequest
from backend.logger.models import ErrorLogger
from import_export.admin import ImportExportModelAdmin


@admin.register(HTTPRequest)
class HTTPRequestAdmin(ImportExportModelAdmin):
    change_list_template = 'admin/change_list_import_export.html'
    change_list_filter_template = 'admin/filter_listing.html'
    list_display = ['modified', 'ip', 'method', 'api_version', 'sha1']
    list_display_links = ['modified']
    list_filter = ['method', 'api_version', 'modified']
    search_fields = ['ip', 'sha1']
    ordering = ['-modified']
    list_per_page = 10


@admin.register(ErrorLogger)
class ErrorLoggerAdmin(ImportExportModelAdmin):
    change_list_template = 'admin/change_list_import_export.html'
    change_list_filter_template = 'admin/filter_listing.html'
    list_display = ['added', 'http_request_sha1']
    list_display_links = ['http_request_sha1']
    list_filter = ['added']
    search_fields = ['^http_request_sha1', '^added']
    ordering = ['-modified']
    list_per_page = 10

{'fraction_non_alphanumeric': 0.1194322075379344, 'fraction_numerical': 0.00930004894762604, 'mean_word_length': 5.468354430379747, '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': '7521559', 'n_tokens_mistral': 633, 'n_tokens_neox': 616, 'n_words': 124}