2020-02-21 15:33:37 +00:00
|
|
|
from django.contrib import admin
|
|
|
|
|
|
|
|
# Register your models here.
|
2020-08-01 16:38:38 +00:00
|
|
|
from uncloud_vm.models import *
|
2020-08-01 22:55:07 +00:00
|
|
|
from uncloud_pay.models import Order
|
2020-08-01 16:38:38 +00:00
|
|
|
|
2020-08-01 16:48:51 +00:00
|
|
|
class VMDiskInline(admin.TabularInline):
|
|
|
|
model = VMDiskProduct
|
|
|
|
|
2020-08-01 22:55:07 +00:00
|
|
|
class OrderInline(admin.TabularInline):
|
|
|
|
model = Order
|
|
|
|
|
2020-08-01 16:48:51 +00:00
|
|
|
class VMProductAdmin(admin.ModelAdmin):
|
|
|
|
inlines = [
|
2020-08-01 22:55:07 +00:00
|
|
|
VMDiskInline
|
2020-08-01 16:48:51 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
admin.site.register(VMProduct, VMProductAdmin)
|
2020-08-01 16:38:38 +00:00
|
|
|
admin.site.register(VMDiskProduct)
|