<commit_before>from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups

class ComponentInline(admin.TabularInline):
    model = Order_Details
    extra = 1

class OrderInline(admin.TabularInline):
    model = Orders
    extra = 1
    fieldsets = [
                ('Payment information', {'fields': ['paid', 'paid_account', 'paid_date']}),
                ('Additional Shipping information', {'fields': ['receiver', 'shipping_address', 'phone_number']}),
    ]

@admin.register(Orders)
class OrderAdmin(admin.ModelAdmin):
    list_display = ('pk', 'group_id','paid', 'sent')

    fieldsets = [
                (None,               {'fields': ['Orderer', 'group_id']}),
                ('Payment information', {'fields': ['paid', 'paid_account', 'paid_date']}),
                ('Uplink information', {'fields': ['sent', 'sent_date']}),
                ('Additional Shipping information', {'fields': ['receiver', 'shipping_address', 'phone_number']}),
    ]

    inlines = [ComponentInline]

@admin.register(Groups)
class GroupAdmin(admin.ModelAdmin):
    fieldsets = [
                (None,               {'fields': ['ordered', 'orderdate']}),
    ]
<commit_msg>Add Filter option for order amd order group<commit_after>from django.contrib import admin
from digikey.models import Components, Orders, Order_Details, Groups

class ComponentInline(admin.TabularInline):
    model = Order_Details
    extra = 1

class OrderInline(admin.TabularInline):
    model = Orders
    extra = 1
    fieldsets = [
                ('Payment information', {'fields': ['paid', 'paid_account', 'paid_date']}),
                ('Additional Shipping information', {'fields': ['receiver', 'shipping_address', 'phone_number']}),
    ]

@admin.register(Orders)
class OrderAdmin(admin.ModelAdmin):
    list_filter = ['sent', 'paid', 'sent_date']
    list_display = ('pk', 'group_id','paid', 'sent')

    fieldsets = [
                (None,               {'fields': ['Orderer', 'group_id']}),
                ('Payment information', {'fields': ['paid', 'paid_account', 'paid_date']}),
                ('Uplink information', {'fields': ['sent', 'sent_date']}),
                ('Additional Shipping information', {'fields': ['receiver', 'shipping_address', 'phone_number']}),
    ]

    inlines = [ComponentInline]

@admin.register(Groups)
class GroupAdmin(admin.ModelAdmin):
    list_filter = ['ordered', 'orderdate']
    fieldsets = [
                (None,               {'fields': ['ordered', 'orderdate']}),
    ]

{'fraction_non_alphanumeric': 0.16187475384009453, 'fraction_numerical': 0.0015754233950374162, 'mean_word_length': 3.143556280587276, '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': '181294', 'n_tokens_mistral': 729, 'n_tokens_neox': 702, 'n_words': 168}