from django.contrib import admin

from purchase.models import Product
from purchase.models import Purchase
from purchase.models import PurchaseItem


class ProductAdmin(admin.ModelAdmin):
    list_display = (
        'id',
        'name',
        'value',
    )


class PurchaseItemInline(admin.TabularInline):
    model = PurchaseItem


class PurchaseAdmin(admin.ModelAdmin):
    list_display = (
        'id',
        'status',
        'created_at',
        'expires_at',
        'payment_token',
    )
    inlines = (
        PurchaseItemInline,
    )


admin.site.register(Product, ProductAdmin)
admin.site.register(Purchase, PurchaseAdmin)

57e8f1c77e7588080851de69e5fc7a8b51352fcf
<mask token>


class PurchaseItemInline(admin.TabularInline):
    model = PurchaseItem


class PurchaseAdmin(admin.ModelAdmin):
    list_display = 'id', 'status', 'created_at', 'expires_at', 'payment_token'
    inlines = PurchaseItemInline,


<mask token>

<mask token>


class ProductAdmin(admin.ModelAdmin):
    list_display = 'id', 'name', 'value'


class PurchaseItemInline(admin.TabularInline):
    model = PurchaseItem


class PurchaseAdmin(admin.ModelAdmin):
    list_display = 'id', 'status', 'created_at', 'expires_at', 'payment_token'
    inlines = PurchaseItemInline,


<mask token>

<mask token>


class ProductAdmin(admin.ModelAdmin):
    list_display = 'id', 'name', 'value'


class PurchaseItemInline(admin.TabularInline):
    model = PurchaseItem


class PurchaseAdmin(admin.ModelAdmin):
    list_display = 'id', 'status', 'created_at', 'expires_at', 'payment_token'
    inlines = PurchaseItemInline,


admin.site.register(Product, ProductAdmin)
admin.site.register(Purchase, PurchaseAdmin)

from django.contrib import admin
from purchase.models import Product
from purchase.models import Purchase
from purchase.models import PurchaseItem


class ProductAdmin(admin.ModelAdmin):
    list_display = 'id', 'name', 'value'


class PurchaseItemInline(admin.TabularInline):
    model = PurchaseItem


class PurchaseAdmin(admin.ModelAdmin):
    list_display = 'id', 'status', 'created_at', 'expires_at', 'payment_token'
    inlines = PurchaseItemInline,


admin.site.register(Product, ProductAdmin)
admin.site.register(Purchase, PurchaseAdmin)

from django.contrib import admin

from purchase.models import Product
from purchase.models import Purchase
from purchase.models import PurchaseItem


class ProductAdmin(admin.ModelAdmin):
    list_display = (
        'id',
        'name',
        'value',
    )


class PurchaseItemInline(admin.TabularInline):
    model = PurchaseItem


class PurchaseAdmin(admin.ModelAdmin):
    list_display = (
        'id',
        'status',
        'created_at',
        'expires_at',
        'payment_token',
    )
    inlines = (
        PurchaseItemInline,
    )


admin.site.register(Product, ProductAdmin)
admin.site.register(Purchase, PurchaseAdmin)
