summaryrefslogtreecommitdiff
path: root/bak/unused_apps/budget/admin.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2025-01-03 18:46:40 -0600
committerluxagraf <sng@luxagraf.net>2025-01-03 18:46:40 -0600
commitfe7d43f308bbc3953d4a88480b8088d12cbcb0b6 (patch)
tree3aa10d1ac8e041ad2b78a5acf6b29febad6a5fe3 /bak/unused_apps/budget/admin.py
parentdf3bc581e496412ef8c263dbf1cfe00f184e4e59 (diff)
archived old not used apps
Diffstat (limited to 'bak/unused_apps/budget/admin.py')
-rw-r--r--bak/unused_apps/budget/admin.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/bak/unused_apps/budget/admin.py b/bak/unused_apps/budget/admin.py
new file mode 100644
index 0000000..0f578fb
--- /dev/null
+++ b/bak/unused_apps/budget/admin.py
@@ -0,0 +1,32 @@
+from django.contrib import admin
+from .models import LuxSource, LuxPurchase, LuxSpendingCategory, LuxFixedMonthly, LuxPaymentMethod
+
+
+@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',)
+
+
+@admin.register(LuxFixedMonthly)
+class LuxFixedMonthlyAdmin(admin.ModelAdmin):
+ list_display = ('name', 'amount', 'category', 'payment_method')
+
+
+@admin.register(LuxPaymentMethod)
+class LuxPaymentMethodAdmin(admin.ModelAdmin):
+ list_display = ('name',)