You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable PSF staff to force a required image from a sponsorship via benefit configuration (#1900)
* Add missing migrations after changes on the field names and texts
* Add new benefit feature to flag benefits with required image assets
* Add new configuration to admin
* Validate min/max ranges
* Model class to hold generic img assets
* Use UUID to format file paths
* Add new class to require text inputs
* Add asset to store text input from user
* Do not use UUID field as primary key
Django polymorphic does not work with non-integer ids
* Move benefit feature creation to specific method under feature cfg
* Remove duplicated tests
* Create empty ImgAsset during sponsorship creation
* Create empty TextAsset during sponsorship creation
* Check if asset relates to sponsor or sponsorship before creating it
* Add generic relation to iter over all assets from sponsor/sponsorship models
* Assets base models Meta should inherit too
* Prevent same required asset from being created twice
* Optimizes query to list sponsorship benefits
* List sponsorship assets under sponsor/sponsorship detail admin
* Add extra card on sponsorship detail page to link to assets form
* Revert "Add extra card on sponsorship detail page to link to assets form"
This reverts commit 30a8672.
* Update the docs of the sponsors app to give a broader vision of the models structure
field=models.TextField(help_text='Brief description of the sponsor for public display.', verbose_name='Description'),
18
+
),
19
+
migrations.AlterField(
20
+
model_name='sponsor',
21
+
name='landing_page_url',
22
+
field=models.URLField(blank=True, help_text='Landing page URL. This may be provided by the sponsor, however the linked page may not contain any sales or marketing information.', null=True, verbose_name='Landing page URL'),
23
+
),
24
+
migrations.AlterField(
25
+
model_name='sponsor',
26
+
name='name',
27
+
field=models.CharField(help_text='Name of the sponsor, for public display.', max_length=100, verbose_name='Name'),
field=models.ImageField(help_text='For display on our sponsor webpage. High resolution PNG or JPG, smallest dimension no less than 256px', upload_to='sponsor_web_logos', verbose_name='Web logo'),
48
+
),
49
+
migrations.AlterField(
50
+
model_name='sponsorcontact',
51
+
name='primary',
52
+
field=models.BooleanField(default=False, help_text='The primary contact for a sponsorship will be responsible for managing deliverables we need to fulfill benefits. Primary contacts will receive all email notifications regarding sponsorship. '),
('related_to', models.CharField(choices=[('sponsor', 'Sponsor'), ('sponsorship', 'Sponsorship')], help_text='To which instance (Sponsor or Sponsorship) should this asset relate to.', max_length=30, verbose_name='Related To')),
19
+
('internal_name', models.CharField(db_index=True, help_text='Unique name used internally to control if the sponsor/sponsorship already has the asset', max_length=128, unique=True, verbose_name='Internal Name')),
('related_to', models.CharField(choices=[('sponsor', 'Sponsor'), ('sponsorship', 'Sponsorship')], help_text='To which instance (Sponsor or Sponsorship) should this asset relate to.', max_length=30, verbose_name='Related To')),
38
+
('internal_name', models.CharField(db_index=True, help_text='Unique name used internally to control if the sponsor/sponsorship already has the asset', max_length=128, unique=True, verbose_name='Internal Name')),
0 commit comments