summaryrefslogtreecommitdiff
path: root/app/expenses/admin.py
blob: a7548831cd529095db2ac3dce8993314fb2a3b71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from django.contrib import admin

from .models import LuxExpense, Trip, Expense, Month


@admin.register(Trip)
class TripAdmin(admin.ModelAdmin):
    list_display = ('name', 'start')


@admin.register(Expense)
class ExpenseAdmin(admin.ModelAdmin):
    list_display = ('name', 'category', 'amount', 'date_month')
    list_filter = ('date', 'category')


@admin.register(LuxExpense)
class LuxExpenseAdmin(admin.ModelAdmin):
    list_display = ('category', 'amount', 'month')
    list_filter = ('month', 'category')


@admin.register(Month)
class MonthAdmin(admin.ModelAdmin):
    pass