Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): adding partner name to customization #677

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading