-
-
Notifications
You must be signed in to change notification settings - Fork 629
Implement Sponsors Program Support #4520
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
Open
Mr-Rahul-Paul
wants to merge
22
commits into
OWASP:main
Choose a base branch
from
Mr-Rahul-Paul:sponsor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b178341
sponsor page design
Mr-Rahul-Paul eb34099
frontend fixes + expand backend
Mr-Rahul-Paul 945d159
remove comments and fixe lint err
Mr-Rahul-Paul cf697cb
fix lint err:
Mr-Rahul-Paul 555372f
test fixes
Mr-Rahul-Paul 7023f65
fix security err
Mr-Rahul-Paul b3be903
fix bot err
Mr-Rahul-Paul bf56b95
fix bot err
Mr-Rahul-Paul 0382318
fix cspell check
Mr-Rahul-Paul f79dd7a
fix cspell check
Mr-Rahul-Paul 24a5e4c
fix cspell check
Mr-Rahul-Paul 9c7e771
code cleanup
Mr-Rahul-Paul 1104d7e
fix test failure
Mr-Rahul-Paul ca79cd1
fix bot err
Mr-Rahul-Paul 94c2912
fix bot error
Mr-Rahul-Paul 06c1cd4
limit supporter card limit on sponsor page
Mr-Rahul-Paul 9224da7
lint fix + dump data change
Mr-Rahul-Paul b8fedb5
Merge remote-tracking branch 'origin/main' into sponsor
Mr-Rahul-Paul 1330d16
merging and styles fixed
Mr-Rahul-Paul f0f7c92
add tests for sponsortiersection
Mr-Rahul-Paul e97bf2c
lint fix
Mr-Rahul-Paul a80d8ca
lint fix
Mr-Rahul-Paul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
62 changes: 62 additions & 0 deletions
62
backend/apps/owasp/migrations/0073_sponsor_status_contact_email_chapter_project.py
This file contains hidden or 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,62 @@ | ||
| # Generated by Django 5.2 on 2026-04-07 00:00 | ||
|
|
||
| import django.db.models.deletion | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("owasp", "0072_project_project_name_gin_idx_and_more"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="sponsor", | ||
| name="status", | ||
| field=models.CharField( | ||
| choices=[ | ||
| ("draft", "Draft"), | ||
| ("active", "Active"), | ||
| ("archived", "Archived"), | ||
| ], | ||
| db_index=True, | ||
| default="active", | ||
| max_length=10, | ||
| verbose_name="Status", | ||
| ), | ||
| ), | ||
| migrations.AddField( | ||
| model_name="sponsor", | ||
| name="contact_email", | ||
| field=models.EmailField(blank=True, max_length=254, verbose_name="Contact Email"), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name="sponsor", | ||
| name="sort_name", | ||
| field=models.CharField(blank=True, max_length=255, verbose_name="Sort Name"), | ||
| ), | ||
| migrations.AddField( | ||
| model_name="sponsor", | ||
| name="chapter", | ||
| field=models.ForeignKey( | ||
| blank=True, | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="sponsors", | ||
| to="owasp.chapter", | ||
| verbose_name="Chapter", | ||
| ), | ||
| ), | ||
| migrations.AddField( | ||
| model_name="sponsor", | ||
| name="project", | ||
| field=models.ForeignKey( | ||
| blank=True, | ||
| null=True, | ||
| on_delete=django.db.models.deletion.SET_NULL, | ||
| related_name="sponsors", | ||
| to="owasp.project", | ||
| verbose_name="Project", | ||
| ), | ||
| ), | ||
| ] |
26 changes: 26 additions & 0 deletions
26
backend/apps/owasp/migrations/0074_backfill_sponsor_status_not_null.py
This file contains hidden or 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,26 @@ | ||
| # Generated by Django 5.2 on 2026-04-08 00:00 | ||
|
|
||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("owasp", "0073_sponsor_status_contact_email_chapter_project"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RunSQL( | ||
| sql=""" | ||
| UPDATE public.owasp_sponsors | ||
| SET status = 'active' | ||
| WHERE status IS NULL; | ||
|
|
||
| ALTER TABLE public.owasp_sponsors | ||
| ALTER COLUMN status SET DEFAULT 'active'; | ||
|
|
||
| ALTER TABLE public.owasp_sponsors | ||
| ALTER COLUMN status SET NOT NULL; | ||
| """, | ||
| reverse_sql=migrations.RunSQL.noop, | ||
| ) | ||
| ] |
26 changes: 26 additions & 0 deletions
26
backend/apps/owasp/migrations/0075_backfill_sponsor_contact_email_not_null.py
This file contains hidden or 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,26 @@ | ||
| # Generated by Django 5.2 on 2026-04-08 00:00 | ||
|
|
||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("owasp", "0074_backfill_sponsor_status_not_null"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RunSQL( | ||
| sql=""" | ||
| UPDATE public.owasp_sponsors | ||
| SET contact_email = '' | ||
| WHERE contact_email IS NULL; | ||
|
|
||
| ALTER TABLE public.owasp_sponsors | ||
| ALTER COLUMN contact_email SET DEFAULT ''; | ||
|
|
||
| ALTER TABLE public.owasp_sponsors | ||
| ALTER COLUMN contact_email SET NOT NULL; | ||
| """, | ||
| reverse_sql=migrations.RunSQL.noop, | ||
| ) | ||
| ] |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.