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 556B

123456789101112131415161718
  1. from django.contrib import admin
  2. from oscar.apps.shipping.models import (
  3. OrderAndItemCharges, WeightBand, WeightBased)
  4. class OrderChargesAdmin(admin.ModelAdmin):
  5. exclude = ('code',)
  6. list_display = ('name', 'description', 'price_per_order', 'price_per_item', 'free_shipping_threshold')
  7. class WeightBandAdmin(admin.ModelAdmin):
  8. list_display = ('method', 'weight_from', 'weight_to', 'charge')
  9. admin.site.register(OrderAndItemCharges, OrderChargesAdmin)
  10. admin.site.register(WeightBased)
  11. admin.site.register(WeightBand, WeightBandAdmin)