<commit_before>from django.contrib import admin
from .models import DjangoHero, Donation, Testimonial


@admin.register(DjangoHero)
class DjangoHeroAdmin(admin.ModelAdmin):
    list_filter = ['approved', 'created', 'modified',
                   'is_visible', 'is_subscribed', 'is_amount_displayed']
    list_display = ['id', 'name', 'email', 'created', 'modified', 'approved']
    list_editable = ['approved']


@admin.register(Donation)
class Donation(admin.ModelAdmin):
    raw_id_fields = ['donor']
    list_display = ['id', 'amount', 'donor', 'stripe_charge_id',
                    'created', 'modified', 'campaign_name']
    list_filter = ['campaign_name', 'created', 'modified']


@admin.register(Testimonial)
class Testimonial(admin.ModelAdmin):
    pass<commit_msg>Order donations and heroes by creation date in the admin.<commit_after>from django.contrib import admin
from .models import DjangoHero, Donation, Testimonial


@admin.register(DjangoHero)
class DjangoHeroAdmin(admin.ModelAdmin):
    list_filter = ['approved', 'created', 'modified',
                   'is_visible', 'is_subscribed', 'is_amount_displayed']
    list_display = ['id', 'name', 'email', 'created', 'modified', 'approved']
    list_editable = ['approved']
    ordering = ['-created']


@admin.register(Donation)
class Donation(admin.ModelAdmin):
    raw_id_fields = ['donor']
    list_display = ['id', 'amount', 'donor', 'stripe_charge_id',
                    'created', 'modified', 'campaign_name']
    list_filter = ['campaign_name', 'created', 'modified']
    ordering = ['-created']


@admin.register(Testimonial)
class Testimonial(admin.ModelAdmin):
    pass
{'fraction_non_alphanumeric': 0.14727272727272728, 'fraction_numerical': 0.0, 'mean_word_length': 4.521739130434782, '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': '6396634', 'n_tokens_mistral': 519, 'n_tokens_neox': 493, 'n_words': 112}