fix ordering and epaypaymentadmin

This commit is contained in:
Thomas Steen Rasmussen 2021-08-03 09:03:42 +02:00
parent e8d10bb7a1
commit d5fa4b98d5
3 changed files with 24 additions and 2 deletions

View file

@ -23,8 +23,8 @@ admin.site.register(CoinifyAPIRequest)
@admin.register(EpayPayment) @admin.register(EpayPayment)
class EpayPaymentAdmin(admin.ModelAdmin): class EpayPaymentAdmin(admin.ModelAdmin):
list_display = ["id", "order", "callback", "txnid"] list_display = ["uuid", "order", "callback", "txnid"]
list_display = ["order"] list_filter = ["order"]
@admin.register(Invoice) @admin.register(Invoice)

View 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",
},
),
]

View file

@ -562,6 +562,7 @@ class EpayPayment(CreatedUpdatedModel, UUIDModel):
class Meta: class Meta:
verbose_name = "Epay Payment" verbose_name = "Epay Payment"
verbose_name_plural = "Epay Payments" verbose_name_plural = "Epay Payments"
ordering = ["created"]
order = models.OneToOneField("shop.Order", on_delete=models.PROTECT) order = models.OneToOneField("shop.Order", on_delete=models.PROTECT)
callback = models.ForeignKey("shop.EpayCallback", on_delete=models.PROTECT) callback = models.ForeignKey("shop.EpayCallback", on_delete=models.PROTECT)