admin fayllari to'g'irlandi
This commit is contained in:
@@ -8,5 +8,48 @@ from core.apps.payment.models import PaymentModel
|
||||
class PaymentAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"id",
|
||||
"__str__",
|
||||
"valuation",
|
||||
"payer",
|
||||
"amount",
|
||||
"payment_method",
|
||||
"status",
|
||||
"transaction_id",
|
||||
"paid_at",
|
||||
"created_at",
|
||||
)
|
||||
list_filter = (
|
||||
"status",
|
||||
"payment_method",
|
||||
)
|
||||
search_fields = (
|
||||
"transaction_id",
|
||||
"valuation__conclusion_number",
|
||||
"payer__phone",
|
||||
"payer__first_name",
|
||||
"note",
|
||||
)
|
||||
readonly_fields = ("created_at", "updated_at")
|
||||
raw_id_fields = ("valuation", "payer")
|
||||
fieldsets = (
|
||||
("To'lov ma'lumotlari", {
|
||||
"fields": (
|
||||
"valuation",
|
||||
"payer",
|
||||
("amount", "payment_method"),
|
||||
"status",
|
||||
),
|
||||
}),
|
||||
("Tranzaksiya", {
|
||||
"fields": (
|
||||
"transaction_id",
|
||||
"paid_at",
|
||||
),
|
||||
}),
|
||||
("Qo'shimcha", {
|
||||
"fields": ("note",),
|
||||
}),
|
||||
("Tizim", {
|
||||
"classes": ("collapse",),
|
||||
"fields": ("created_at", "updated_at"),
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user