2016-06-03 20:17:22 +02:00
|
|
|
from django.contrib import admin
|
2016-06-04 03:44:41 +02:00
|
|
|
from refunding.forms import RefundForm, RefundFormAdmin
|
2016-06-03 20:17:22 +02:00
|
|
|
from refunding.models import Refund, Payment
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Refund)
|
|
|
|
class RefundAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('title', 'date', 'user')
|
|
|
|
list_display_links = ('title',)
|
|
|
|
search_fields = ('title',)
|
|
|
|
date_hierarchy = 'date'
|
2016-06-04 03:44:41 +02:00
|
|
|
form = RefundFormAdmin
|
2016-06-04 01:55:27 +02:00
|
|
|
readonly_fields = ('eur_value',)
|
2016-06-03 20:17:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Payment)
|
|
|
|
class PaymentAdmin(admin.ModelAdmin):
|
2016-06-04 01:24:40 +02:00
|
|
|
list_display = ('title', 'date', 'eur_value', 'user', 'refund')
|
2016-06-03 20:17:22 +02:00
|
|
|
list_display_links = ('title',)
|
|
|
|
search_fields = ('title',)
|
|
|
|
date_hierarchy = 'date'
|