<commit_before>from django.contrib import admin

from parliament.alerts.models import *

class PoliticianAlertAdmin(admin.ModelAdmin):
    
    list_display = ('email', 'politician', 'active', 'created')
    search_fields = ('email', 'politician__name')
    
admin.site.register(PoliticianAlert, PoliticianAlertAdmin)


class TopicAdmin(admin.ModelAdmin):

    list_display = ['query', 'created', 'last_found']
    search_fields = ['query']


class SubscriptionAdmin(admin.ModelAdmin):

    list_display = ['user', 'topic', 'active', 'created', 'last_sent']
    search_fields = ['user__email']
    list_filter = ['active', 'created', 'last_sent']

admin.site.register(Topic, TopicAdmin)
admin.site.register(Subscription, SubscriptionAdmin)
admin.site.register(SeenItem)<commit_msg>Alerts admin tweaks<commit_after>from django.contrib import admin

from parliament.alerts.models import *

class PoliticianAlertAdmin(admin.ModelAdmin):
    
    list_display = ('email', 'politician', 'active', 'created')
    search_fields = ('email', 'politician__name')
    
admin.site.register(PoliticianAlert, PoliticianAlertAdmin)


class TopicAdmin(admin.ModelAdmin):

    list_display = ['query', 'created', 'last_found']
    search_fields = ['query']
    ordering = ['-created']


class SubscriptionAdmin(admin.ModelAdmin):

    list_display = ['user', 'topic', 'active', 'created', 'last_sent']
    search_fields = ['user__email']
    list_filter = ['active', 'created', 'last_sent']
    ordering = ['-created']

admin.site.register(Topic, TopicAdmin)
admin.site.register(Subscription, SubscriptionAdmin)
admin.site.register(SeenItem)
{'fraction_non_alphanumeric': 0.1416256157635468, 'fraction_numerical': 0.0, 'mean_word_length': 5.578947368421052, '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': '5870011', 'n_tokens_mistral': 493, 'n_tokens_neox': 483, 'n_words': 97}