forked from hackforla/peopledepot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename affiliate and add affiliation model admin endpoints
- renamed sponsor_partner table and model to affiliate - added model: affiliation - registered admin: affiliation - added endpoints: affiliation
- Loading branch information
1 parent
380c409
commit 56e8462
Showing
10 changed files
with
268 additions
and
31 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
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
71 changes: 71 additions & 0 deletions
71
app/core/migrations/0022_rename_sponsorpartner_affiliate_affiliation_and_more.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,71 @@ | ||
# Generated by Django 4.2.11 on 2024-05-09 02:32 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("core", "0021_sdg"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameModel( | ||
old_name="SponsorPartner", | ||
new_name="Affiliate", | ||
), | ||
migrations.CreateModel( | ||
name="Affiliation", | ||
fields=[ | ||
( | ||
"uuid", | ||
models.UUIDField( | ||
default=uuid.uuid4, | ||
editable=False, | ||
primary_key=True, | ||
serialize=False, | ||
unique=True, | ||
), | ||
), | ||
( | ||
"created_at", | ||
models.DateTimeField(auto_now_add=True, verbose_name="Created at"), | ||
), | ||
( | ||
"updated_at", | ||
models.DateTimeField(auto_now=True, verbose_name="Updated at"), | ||
), | ||
( | ||
"ended_at", | ||
models.DateTimeField( | ||
blank=True, null=True, verbose_name="Ended at" | ||
), | ||
), | ||
("is_sponsor", models.BooleanField(null=True)), | ||
("is_partner", models.BooleanField(null=True)), | ||
( | ||
"affiliate", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, to="core.affiliate" | ||
), | ||
), | ||
( | ||
"project", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, to="core.project" | ||
), | ||
), | ||
], | ||
options={ | ||
"db_table": "project_affiliate_xref", | ||
}, | ||
), | ||
migrations.AddConstraint( | ||
model_name="affiliation", | ||
constraint=models.UniqueConstraint( | ||
fields=("project", "affiliate"), name="unique_project_affiliate" | ||
), | ||
), | ||
] |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0021_sdg | ||
0022_rename_sponsorpartner_affiliate_affiliation_and_more |
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
Oops, something went wrong.