Skip to content

Commit

Permalink
feat(api): adding partner name to customization (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianHymer authored Sep 17, 2024
1 parent 310d718 commit 4c73822
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/account/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ class CustomizationAdmin(ScorerModelAdmin):
{
"fields": [
"path",
"partner_name",
"scorer_panel_title",
"scorer_panel_text",
"scorer",
Expand Down
1 change: 1 addition & 0 deletions api/account/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
21 changes: 21 additions & 0 deletions api/account/migrations/0037_customization_partner_name.py
Original file line number Diff line number Diff line change
@@ -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,
),
),
]
8 changes: 8 additions & 0 deletions api/account/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4c73822

Please sign in to comment.