You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin.py 358B

12345678910
  1. from django.contrib import admin
  2. from oscar.core.loading import import_module
  3. import_module('discount.models', ['DiscountOffer'], locals())
  4. class DiscountOfferAdmin(admin.ModelAdmin):
  5. list_display = ('name', 'discount_type', 'discount_value', 'num_products')
  6. list_filter = ('discount_type',)
  7. admin.site.register(DiscountOffer, DiscountOfferAdmin)