regluit/payment/admin.py

19 lines
523 B
Python
Raw Normal View History

2016-07-26 14:34:45 +00:00
from django.contrib.admin import ModelAdmin, site
from .models import Transaction, PaymentResponse, Receiver
class TransactionAdmin(ModelAdmin):
list_display = ('campaign', 'user', 'amount', 'status', 'error')
date_hierarchy = 'date_created'
class PaymentResponseAdmin(ModelAdmin):
pass
class ReceiverAdmin(ModelAdmin):
ordering = ('email',)
# payments
site.register(Transaction, TransactionAdmin)
site.register(PaymentResponse, PaymentResponseAdmin)
site.register(Receiver, ReceiverAdmin)