<commit_before>from django.contrib import admin
from cjdata.models import (Category, Dataset)


class CategoryAdmin(admin.ModelAdmin):
    '''
        Admin View for Category
    '''
    list_display = ('name', 'parent')


class DatasetAdmin(admin.ModelAdmin):
    '''
        Admin View for Dataset
    '''
    list_display = ('title', 'state', 'tags', 'url')
    list_filter = ('state',)
    search_fields = ['title', 'description', 'tags']
    filter_horizontal = ('categories',)

admin.site.register(Category, CategoryAdmin)
admin.site.register(Dataset, DatasetAdmin)
<commit_msg>Tweak admin, show pathname representation of category.<commit_after>from django.contrib import admin
from cjdata.models import (Category, Dataset)


class CategoryAdmin(admin.ModelAdmin):
    '''
        Admin View for Category
    '''
    list_display = ('pathname', 'name', 'parent', 'created_at', 'updated_at')
    search_fields = ['name', ]


class DatasetAdmin(admin.ModelAdmin):
    '''
        Admin View for Dataset
    '''
    list_display = ('title', 'states', 'tags', 'url', 'created_at', 'updated_at')
    list_filter = ('states',)
    search_fields = ['title', 'description', 'tags']
    filter_horizontal = ('categories',)

admin.site.register(Category, CategoryAdmin)
admin.site.register(Dataset, DatasetAdmin)

{'fraction_non_alphanumeric': 0.14427480916030536, 'fraction_numerical': 0.0, 'mean_word_length': 4.223107569721115, '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': '1251116', 'n_tokens_mistral': 384, 'n_tokens_neox': 381, 'n_words': 95}