-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support GitHub sponsors as a payout option
- Loading branch information
1 parent
87768f7
commit 2a1af2b
Showing
4 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -1198,6 +1198,14 @@ def __init__(self, *args, **kwargs): | |
Field("paypal_email", placeholder="[email protected]"), | ||
data_bind="visible: (payoutMethod() == 'paypal')", | ||
), | ||
Div( | ||
PrependedText( | ||
"github_sponsors_name", | ||
"https://github.com/sponsors/", | ||
placeholder="your-github-name", | ||
), | ||
data_bind="visible: (payoutMethod() == 'github')", | ||
), | ||
"skip_payouts", | ||
css_class="my-3", | ||
), | ||
|
@@ -1242,6 +1250,7 @@ class Meta: | |
"payout_method", | ||
"open_collective_name", | ||
"paypal_email", | ||
"github_sponsors_name", | ||
"skip_payouts", | ||
"allow_affiliate_campaigns", | ||
"allow_community_campaigns", | ||
|
103 changes: 103 additions & 0 deletions
103
adserver/migrations/0092_payout_method_github_sponsors.py
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,103 @@ | ||
# Generated by Django 4.2.4 on 2024-02-16 20:54 | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("adserver", "0091_publisher_group_default"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="historicalpublisher", | ||
name="github_sponsors_name", | ||
field=models.CharField( | ||
blank=True, | ||
default=None, | ||
max_length=200, | ||
null=True, | ||
verbose_name="GitHub sponsors name", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="publisher", | ||
name="github_sponsors_name", | ||
field=models.CharField( | ||
blank=True, | ||
default=None, | ||
max_length=200, | ||
null=True, | ||
verbose_name="GitHub sponsors name", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="historicalpublisher", | ||
name="payout_method", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[ | ||
("stripe", "Stripe (Bank transfer, debit card)"), | ||
("paypal", "PayPal"), | ||
("opencollective", "Open Collective"), | ||
("github", "GitHub sponsors"), | ||
("other", "Other"), | ||
], | ||
default=None, | ||
max_length=100, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="historicalpublisherpayout", | ||
name="method", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[ | ||
("stripe", "Stripe (Bank transfer, debit card)"), | ||
("paypal", "PayPal"), | ||
("opencollective", "Open Collective"), | ||
("github", "GitHub sponsors"), | ||
("other", "Other"), | ||
], | ||
default=None, | ||
max_length=100, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="publisher", | ||
name="payout_method", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[ | ||
("stripe", "Stripe (Bank transfer, debit card)"), | ||
("paypal", "PayPal"), | ||
("opencollective", "Open Collective"), | ||
("github", "GitHub sponsors"), | ||
("other", "Other"), | ||
], | ||
default=None, | ||
max_length=100, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="publisherpayout", | ||
name="method", | ||
field=models.CharField( | ||
blank=True, | ||
choices=[ | ||
("stripe", "Stripe (Bank transfer, debit card)"), | ||
("paypal", "PayPal"), | ||
("opencollective", "Open Collective"), | ||
("github", "GitHub sponsors"), | ||
("other", "Other"), | ||
], | ||
default=None, | ||
max_length=100, | ||
null=True, | ||
), | ||
), | ||
] |
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