<commit_before>from django.contrib import admin

from package.models import Category, Package, PackageExample, Repo

class PackageExampleInline(admin.TabularInline):
    model = PackageExample
    
class PackageAdmin(admin.ModelAdmin):
    inlines = [
        PackageExampleInline,
    ]
    fieldsets = (
        (None, {
            'fields': ('title', 'slug', 'category', 'repo', 'repo_url', 'related_packages')
        }),
        ('Pulled data', {
            'classes': ('collapse',),
            'fields': ('repo_description', 'repo_watchers', 'repo_forks', 'repo_commits', 'pypi_version', 'pypi_downloads', 'participants')
        }),
    )    

admin.site.register(Category)
admin.site.register(Package, PackageAdmin)
admin.site.register(Repo)<commit_msg>Controls to review packages<commit_after>from django.contrib import admin

from package.models import Category, Package, PackageExample, Repo

class PackageExampleInline(admin.TabularInline):
    model = PackageExample
    
class PackageAdmin(admin.ModelAdmin):
    
    search_fields = ('title',)
    list_filter = ('category','repo')    
    list_display = ('title', 'created', )
    date_hierarchy = 'created'    
    inlines = [
        PackageExampleInline,
    ]
    fieldsets = (
        (None, {
            'fields': ('title', 'slug', 'category', 'repo', 'repo_url', 'related_packages')
        }),
        ('Pulled data', {
            'classes': ('collapse',),
            'fields': ('repo_description', 'repo_watchers', 'repo_forks', 'repo_commits', 'pypi_version', 'pypi_downloads', 'participants')
        }),
    )    

admin.site.register(Category)
admin.site.register(Package, PackageAdmin)
admin.site.register(Repo)
{'fraction_non_alphanumeric': 0.14142604596346495, 'fraction_numerical': 0.0, 'mean_word_length': 3.342710997442455, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5861178', 'n_tokens_mistral': 499, 'n_tokens_neox': 497, 'n_words': 99}