Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4261 from django-oscar/excluded-categories
[FEAT] Add excluded categories in range
- Loading branch information
Showing
5 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ class Meta: | |
"is_public", | ||
"includes_all_products", | ||
"included_categories", | ||
"excluded_categories", | ||
] | ||
|
||
|
||
|
This file contains 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
24 changes: 24 additions & 0 deletions
24
src/oscar/apps/offer/migrations/0013_range_excluded_categories.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.9 on 2024-03-22 19:20 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("catalogue", "0027_attributeoption_code_attributeoptiongroup_code_and_more"), | ||
("offer", "0012_fixedunitdiscountbenefit_alter_benefit_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="range", | ||
name="excluded_categories", | ||
field=models.ManyToManyField( | ||
blank=True, | ||
help_text="Products with these categories are excluded from the range when Includes all products is checked", | ||
related_name="excludes", | ||
to="catalogue.category", | ||
verbose_name="Excluded Categories", | ||
), | ||
), | ||
] |
This file contains 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
This file contains 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