Project_Camper/vagus/camper/admin.py

20 lines
455 B
Python
Raw Normal View History

2020-12-27 01:33:07 +01:00
from django.contrib import admin
from .models import Offer, Offer_Category, Image_offer
# Register your models here.
class OfferALlDetail(admin.StackedInline):
model = Image_offer
can_delete = True
verbose_name = 'Image'
class OfferAdmin(admin.ModelAdmin):
model = Offer
inlines = [OfferALlDetail]
list_display = ('title','category','price','status')
admin.site.register(Offer,OfferAdmin)
admin.site.register(Offer_Category)