Created
June 15, 2020 05:40
-
-
Save jerinisready/6d06754da62c1f46a825eaff1eebd026 to your computer and use it in GitHub Desktop.
Dajngo Oscar Buy Now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.db import models | |
| from oscar.apps.basket.abstract_models import AbstractBasket | |
| from django.utils.translation import gettext_lazy as _ | |
| class Basket(AbstractBasket): | |
| BUY_NOW, OPEN, MERGED, SAVED, FROZEN, SUBMITTED = ( | |
| "Buy Now", "Open", "Merged", "Saved", "Frozen", "Submitted") | |
| STATUS_CHOICES = ( | |
| (BUY_NOW, _("Buy Now")), | |
| (OPEN, _("Open - currently active")), | |
| (MERGED, _("Merged - superceded by another basket")), | |
| (SAVED, _("Saved - for items to be purchased later")), | |
| (FROZEN, _("Frozen - the basket cannot be modified")), | |
| (SUBMITTED, _("Submitted - has been ordered at the checkout")), | |
| ) | |
| status = models.CharField(_("Status"), max_length=128, | |
| default=OPEN, | |
| choices=STATUS_CHOICES) | |
| from oscar.apps.basket.models import * # noqa isort:skip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSTALED_APPS = [ | |
| ... | |
| "apps.basket.apps.BasketConfig", | |
| ... | |
| ... | |
| # "oscar.apps.basket", <-- Remove line | |
| ... | |
| ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment