<commit_before>from django.contrib import admin
from . import models as mdpage

# The following classes define the admin interface for your models.
# See http://docs.djangoproject.com/en/dev/ref/contrib/admin/ for
# a full list of the options you can use in these classes.


class MarkdownPageAdmin(admin.ModelAdmin):
    list_display = (
        'title',
        'created',
        'updated',
    )
    search_fields = ('title', 'source')
    # list_filter = ('',)
    # ordering = ('',)


class MarkdownPageArchiveAdmin(admin.ModelAdmin):
    list_display = (
        'page',
        'created',
    )
    # search_fields = ('',)
    # list_filter = ('',)
    # ordering = ('',)


class StaticContentAdmin(admin.ModelAdmin):
    list_display = (
        'label',
        'description',
        'type',
        'subtype',
        'created',
        'updated',
    )
    # search_fields = ('',)
    # list_filter = ('',)
    # ordering = ('',)


# Each of these lines registers the admin interface for one model. If
# you don't want the admin interface for a particular model, remove
# the line which registers it.
admin.site.register(mdpage.MarkdownPage, MarkdownPageAdmin)
admin.site.register(mdpage.MarkdownPageArchive, MarkdownPageArchiveAdmin)
admin.site.register(mdpage.StaticContent, StaticContentAdmin)<commit_msg>cleaned up admin models<commit_after>from django.contrib import admin
from . import models as mdpage

# The following classes define the admin interface for your models.
# See http://docs.djangoproject.com/en/dev/ref/contrib/admin/ for
# a full list of the options you can use in these classes.


@admin.register(mdpage.MarkdownPage)
class MarkdownPageAdmin(admin.ModelAdmin):
    list_display = (
        'title',
        'type',
        'status',
        'created',
        'updated',
    )
    search_fields = ('title', 'source')
    list_filter = ('type', 'status')
    # ordering = ('',)


@admin.register(mdpage.MarkdownPageArchive)
class MarkdownPageArchiveAdmin(admin.ModelAdmin):
    list_display = (
        'page_title',
        'page_type',
        'created',
    )

    def page_title(self, obj):
        return obj.page.title

    def page_type(self, obj):
        return obj.page.type


@admin.register(mdpage.StaticContent)
class StaticContentAdmin(admin.ModelAdmin):
    list_display = (
        'label',
        'description',
        'type',
        'subtype',
        'created',
        'updated',
    )


@admin.register(mdpage.MarkdownPageType)
class MarkdownPageTypeAdmin(admin.ModelAdmin):
    list_display = (
        'prefix', 
        'description', 
        'created', 
        'updated', 
        'pub_date', 
        'end_date', 
        'status', 
    )
{'fraction_non_alphanumeric': 0.12236598890942699, 'fraction_numerical': 0.0, 'mean_word_length': 2.7583333333333333, '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': '4177229', 'n_tokens_mistral': 824, 'n_tokens_neox': 797, 'n_words': 189}