diff --git a/api/account/admin.py b/api/account/admin.py index 55858329..0983bcce 100644 --- a/api/account/admin.py +++ b/api/account/admin.py @@ -242,6 +242,7 @@ class CustomizationAdmin(ScorerModelAdmin): { "fields": [ "path", + "partner_name", "scorer_panel_title", "scorer_panel_text", "scorer", diff --git a/api/account/api.py b/api/account/api.py index 624a2530..84a94b24 100644 --- a/api/account/api.py +++ b/api/account/api.py @@ -628,6 +628,7 @@ def get_account_customization(request, dashboard_path: str): return dict( key=customization.path, + partnerName=customization.partner_name, useCustomDashboardPanel=customization.use_custom_dashboard_panel, customizationTheme={ "colors": { diff --git a/api/account/migrations/0037_customization_partner_name.py b/api/account/migrations/0037_customization_partner_name.py new file mode 100644 index 00000000..82621667 --- /dev/null +++ b/api/account/migrations/0037_customization_partner_name.py @@ -0,0 +1,21 @@ +# Generated by Django 4.2.6 on 2024-09-17 15:21 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("account", "0036_customization_show_explanation_panel"), + ] + + operations = [ + migrations.AddField( + model_name="customization", + name="partner_name", + field=models.CharField( + default="Partner", + help_text="The name of the partner, e.g. Gitcoin", + max_length=100, + ), + ), + ] diff --git a/api/account/models.py b/api/account/models.py index 50c995f0..e9e9ee07 100644 --- a/api/account/models.py +++ b/api/account/models.py @@ -451,6 +451,14 @@ class CustomizationOnChainButtonAction(models.TextChoices): SIMPLE_LINK = "Simple Link" ONCHAIN_PUSH = "Onchain Push" + partner_name = models.CharField( + max_length=100, + null=False, + blank=False, + default="Partner", + help_text="The name of the partner, e.g. Gitcoin", + ) + path = models.CharField( max_length=100, db_index=True,