Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

admin.py 675B

12345678910111213141516171819202122
  1. from django.contrib import admin
  2. from oscar.core.loading import get_model
  3. Source = get_model('payment', 'Source')
  4. Transaction = get_model('payment', 'Transaction')
  5. SourceType = get_model('payment', 'SourceType')
  6. Bankcard = get_model('payment', 'Bankcard')
  7. class SourceAdmin(admin.ModelAdmin):
  8. list_display = ('order', 'source_type', 'amount_allocated',
  9. 'amount_debited', 'balance', 'reference')
  10. class BankcardAdmin(admin.ModelAdmin):
  11. list_display = ('number', 'card_type', 'expiry_month')
  12. admin.site.register(Source, SourceAdmin)
  13. admin.site.register(SourceType)
  14. admin.site.register(Transaction)
  15. admin.site.register(Bankcard, BankcardAdmin)