You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
1.2 KiB

# -*- coding: utf-8 -*-
# This file is part of k4ever, a point-of-sale system
# Contact............ <k4ever@lists.someserver.de>
# Website............ http://k4ever.someserver.de/
# Bug tracker........ http://k4ever.someserver.de/report
#
# Licensed under GNU Affero General Public License v3 or later
from django.contrib import admin
from transaction.models import Transaction, TransactionType, VirtualTransaction
class TransactionAdmin(admin.ModelAdmin):
list_filter = ('transactionType','checked','user')
list_display = ('user', 'transactionType', 'amount', 'dateTime', 'checked')
list_display_links = ('user', 'transactionType')
search_fields = ['user__username','user__first_name','user__last_name']
date_hierarchy = 'dateTime'
ordering = ['-dateTime']
class VirtualTransactionAdmin(admin.ModelAdmin):
list_display = ('user','recipient','amount','dateTime','comment')
list_display_links = ('user','recipient')
list_filter = ('user','recipient')
search_fields = ['user__username','recipient__username','comment']
date_hierarchy = 'dateTime'
ordering = ['-dateTime']
admin.site.register(TransactionType)
admin.site.register(Transaction, TransactionAdmin)
admin.site.register(VirtualTransaction, VirtualTransactionAdmin)