-
Notifications
You must be signed in to change notification settings - Fork 581
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add display label to Tiered Benefits (#2115)
* Add missing migration after changing ordring of packages The ordering in Meta was change by 0197bd5 * Rename TieredQuantity to TieredBenefit (both configuration and feature objects) * Add display label field to base tiered benefits abstract model * Update template tag to prioritize tiered benefit label over quantity * Add assertions to make sure display label is correctly configured and cloned * Update display modifiers to prioritize label instead of quantity * correct migrations * Update fixture file to match table new name Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
- Loading branch information
Showing
12 changed files
with
216 additions
and
140 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,26 @@ | ||
# Generated by Django 2.2.24 on 2022-08-10 16:47 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('contenttypes', '0002_remove_content_type_name'), | ||
('sponsors', '0086_auto_20220809_1655'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameModel( | ||
old_name='TieredQuantity', | ||
new_name='TieredBenefit', | ||
), | ||
migrations.RenameModel( | ||
old_name='TieredQuantityConfiguration', | ||
new_name='TieredBenefitConfiguration', | ||
), | ||
migrations.AlterModelOptions( | ||
name='tieredbenefit', | ||
options={'base_manager_name': 'objects', 'verbose_name': 'Tiered Benefit', 'verbose_name_plural': 'Tiered Benefits'}, | ||
), | ||
] |
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,23 @@ | ||
# Generated by Django 2.2.24 on 2022-08-10 16:55 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sponsors', '0087_auto_20220810_1647'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='tieredbenefit', | ||
name='display_label', | ||
field=models.CharField(blank=True, default='', help_text='If populated, this will be displayed instead of the quantity value.', max_length=32), | ||
), | ||
migrations.AddField( | ||
model_name='tieredbenefitconfiguration', | ||
name='display_label', | ||
field=models.CharField(blank=True, default='', help_text='If populated, this will be displayed instead of the quantity value.', max_length=32), | ||
), | ||
] |
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
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
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
Oops, something went wrong.