Tesis 1.0.0
Loading...
Searching...
No Matches
admin.py
Go to the documentation of this file.
1from django.contrib import admin
2from .models import PaymentRequest, PaymentNotification
3
4@admin.register(PaymentRequest)
5class PaymentRequestAdmin(admin.ModelAdmin):
6 list_display = ('id', 'preference_id', 'status', 'total_amount', 'created_at')
7 list_filter = ('status', 'created_at')
8 search_fields = ('id', 'preference_id', 'user_token')
9 readonly_fields = ('id', 'created_at', 'updated_at', 'cart_data')
10 ordering = ('-created_at',)
11
12@admin.register(PaymentNotification)
13class PaymentNotificationAdmin(admin.ModelAdmin):
14 list_display = ('id', 'payment_id', 'topic', 'processed', 'created_at')
15 list_filter = ('topic', 'processed', 'created_at')
16 search_fields = ('id', 'payment_id')
17 readonly_fields = ('id', 'created_at', 'raw_data')
18 ordering = ('-created_at',)