from django.contrib import admin from .models import Expense, Trip class TripAdmin(admin.ModelAdmin): list_display = ('name', 'start') class ExpenseAdmin(admin.ModelAdmin): list_display = ('name', 'category', 'amount', 'date_month') list_filter = ('date', 'category') admin.site.register(Expense, ExpenseAdmin) admin.site.register(Trip, TripAdmin)