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


@admin.register(Tweet)
class TweetAdmin(admin.ModelAdmin):
    list_display = ('user', 'text', 'created')
    list_filter = ('created', 'user')
    date_hierarchy = 'created'
    readonly_fields = (
        'tweet_id', 'user', 'name', 'text', 'html', 'retweeted_username', 'retweeted_name',
        'retweeted_tweet_id', 'is_reply', 'created')

    def has_add_permission(self, request):
        return False<commit_msg>Show the HTML version as HTML<commit_after>from django.contrib import admin
from .models import Tweet


@admin.register(Tweet)
class TweetAdmin(admin.ModelAdmin):
    list_display = ('user', 'text', 'created')
    list_filter = ('created', 'user')
    date_hierarchy = 'created'
    readonly_fields = (
        'tweet_id', 'user', 'name', 'text', 'tweet_html', 'retweeted_username', 'retweeted_name',
        'retweeted_tweet_id', 'is_reply', 'created')
    fieldsets = (
        (None, {
            'fields': readonly_fields,
        }),
    )

    def has_add_permission(self, request):
        return False

    def tweet_html(self, obj):
        return obj.html
    tweet_html.short_description = 'HTML'
    tweet_html.allow_tags = True
{'fraction_non_alphanumeric': 0.13419563459983833, 'fraction_numerical': 0.0, 'mean_word_length': 3.6194029850746268, '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': '1839845', 'n_tokens_mistral': 401, 'n_tokens_neox': 392, 'n_words': 89}