<commit_before>from django.contrib import admin
from django.contrib.admin.models import LogEntry

from django.contrib.admin import AdminSite


class IntrAdmSite(AdminSite):
    site_header = 'Intranet - Tussor - Administração'


intr_adm_site = IntrAdmSite(name='intradm')


# Alter root admin site to show LogEntry

class LogEntryAdmin(admin.ModelAdmin):
    search_fields = ('object_repr', 'object_id')
    list_filter = ('action_time', 'content_type',)
    list_display = ('action_time', 'user', 'content_type', 'tipo',
                    'object_repr')
    fields = ('action_time', 'user', 'content_type', 'object_id',
              'object_repr', 'action_flag', 'change_message', )
    readonly_fields = ('action_time', 'user', 'content_type', 'object_id',
                       'object_repr', 'action_flag', 'tipo', 'change_message',)

    def tipo(self, obj):
        if obj.is_addition():
            return u"Adicionado"
        elif obj.is_change():
            return u"Modificado"
        elif obj.is_deletion():
            return u"Deletado"


admin.site.register(LogEntry, LogEntryAdmin)
<commit_msg>change header and titles of intradm<commit_after>from django.contrib import admin
from django.contrib.admin.models import LogEntry

from django.contrib.admin import AdminSite


class IntrAdmSite(AdminSite):
    site_header = 'Intranet Tussor - Cadastros'
    site_title = 'Fo2 - Intranet Tussor - Cadastros'
    index_title = 'Cadastros'


intr_adm_site = IntrAdmSite(name='intradm')


# Alter root admin site to show LogEntry

class LogEntryAdmin(admin.ModelAdmin):
    search_fields = ('object_repr', 'object_id')
    list_filter = ('action_time', 'content_type',)
    list_display = ('action_time', 'user', 'content_type', 'tipo',
                    'object_repr')
    fields = ('action_time', 'user', 'content_type', 'object_id',
              'object_repr', 'action_flag', 'change_message', )
    readonly_fields = ('action_time', 'user', 'content_type', 'object_id',
                       'object_repr', 'action_flag', 'tipo', 'change_message',)

    def tipo(self, obj):
        if obj.is_addition():
            return u"Adicionado"
        elif obj.is_change():
            return u"Modificado"
        elif obj.is_deletion():
            return u"Deletado"


admin.site.register(LogEntry, LogEntryAdmin)

{'fraction_non_alphanumeric': 0.12301757393913416, 'fraction_numerical': 0.0004286326618088298, 'mean_word_length': 3.346368715083799, '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': '4071586', 'n_tokens_mistral': 755, 'n_tokens_neox': 725, 'n_words': 162}