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

12345678910111213141516171819202122
  1. from oscar.core.loading import is_model_registered
  2. from oscar.apps.basket.abstract_models import (
  3. AbstractBasket, AbstractLine, AbstractLineAttribute)
  4. class InvalidBasketLineError(Exception):
  5. pass
  6. if not is_model_registered('basket', 'Basket'):
  7. class Basket(AbstractBasket):
  8. pass
  9. if not is_model_registered('basket', 'Line'):
  10. class Line(AbstractLine):
  11. pass
  12. if not is_model_registered('basket', 'LineAttribute'):
  13. class LineAttribute(AbstractLineAttribute):
  14. pass