fix ordering and epaypaymentadmin
This commit is contained in:
parent
e8d10bb7a1
commit
d5fa4b98d5
|
@ -23,8 +23,8 @@ admin.site.register(CoinifyAPIRequest)
|
|||
|
||||
@admin.register(EpayPayment)
|
||||
class EpayPaymentAdmin(admin.ModelAdmin):
|
||||
list_display = ["id", "order", "callback", "txnid"]
|
||||
list_display = ["order"]
|
||||
list_display = ["uuid", "order", "callback", "txnid"]
|
||||
list_filter = ["order"]
|
||||
|
||||
|
||||
@admin.register(Invoice)
|
||||
|
|
21
src/shop/migrations/0065_alter_epaypayment_options.py
Normal file
21
src/shop/migrations/0065_alter_epaypayment_options.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Generated by Django 3.2.5 on 2021-08-03 07:03
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("shop", "0064_add_product_comment_and_cost"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="epaypayment",
|
||||
options={
|
||||
"ordering": ["created"],
|
||||
"verbose_name": "Epay Payment",
|
||||
"verbose_name_plural": "Epay Payments",
|
||||
},
|
||||
),
|
||||
]
|
|
@ -562,6 +562,7 @@ class EpayPayment(CreatedUpdatedModel, UUIDModel):
|
|||
class Meta:
|
||||
verbose_name = "Epay Payment"
|
||||
verbose_name_plural = "Epay Payments"
|
||||
ordering = ["created"]
|
||||
|
||||
order = models.OneToOneField("shop.Order", on_delete=models.PROTECT)
|
||||
callback = models.ForeignKey("shop.EpayCallback", on_delete=models.PROTECT)
|
||||
|
|
Loading…
Reference in a new issue