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.

models.py 552B

12345678910111213141516171819202122232425
  1. import django
  2. from oscar.core.loading import is_model_registered
  3. from oscar.apps.voucher.abstract_models import (
  4. AbstractVoucher, AbstractVoucherApplication)
  5. __all__ = []
  6. if not is_model_registered('voucher', 'Voucher'):
  7. class Voucher(AbstractVoucher):
  8. pass
  9. __all__.append('Voucher')
  10. if not is_model_registered('voucher', 'VoucherApplication'):
  11. class VoucherApplication(AbstractVoucherApplication):
  12. pass
  13. __all__.append('VoucherApplication')
  14. if django.VERSION < (1, 7):
  15. from . import receivers # noqa