from django.contrib import admin from .models import LuxSource, LuxPurchase, LuxSpendingCategory @admin.register(LuxSpendingCategory) class SourceAdmin(admin.ModelAdmin): list_display = ('name',) @admin.register(LuxSource) class SourceAdmin(admin.ModelAdmin): list_display = ('name',) @admin.register(LuxPurchase) class PurchaseAdmin(admin.ModelAdmin): list_display = ('source', 'amount', 'category' ) search_fields = ['source', 'amount'] list_filter = ('category',) class Media: js = ('next-prev-links.js',)