-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transcribe the donor for to the new backend (#138)
* Improve form_url constraints * Fix the user verification * Code format * Show the donation success page * noqa * noqa... again * noqa specific warning * Revert twopercent template and js * Begin upgrading the PDF generation * First beta for the PDF generator on Python3 * Code format * Tweaks & fixes - add a slug to NGOs - change fields to the correct form * Update comment --------- Co-authored-by: Tudor Amariei <[email protected]>
- Loading branch information
1 parent
916a249
commit 5bb648a
Showing
26 changed files
with
1,080 additions
and
338 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
46 changes: 46 additions & 0 deletions
46
backend/donations/migrations/0004_ngo_image_ngo_logo_alter_ngo_form_url_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,46 @@ | ||
# Generated by Django 4.2.9 on 2024-01-10 04:54 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.functions.text | ||
import donations.models | ||
import functools | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("donations", "0003_donor_initial_donor_personal_identifier_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="ngo", | ||
name="image", | ||
field=models.ImageField( | ||
blank=True, | ||
storage=donations.models.select_public_storage, | ||
upload_to=functools.partial(donations.models.ngo_directory_path, *("images",), **{}), | ||
verbose_name="image", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="ngo", | ||
name="logo", | ||
field=models.ImageField( | ||
blank=True, | ||
storage=donations.models.select_public_storage, | ||
upload_to=functools.partial(donations.models.ngo_directory_path, *("logos",), **{}), | ||
verbose_name="logo", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="ngo", | ||
name="form_url", | ||
field=models.SlugField(max_length=100, null=True, unique=True, verbose_name="form url"), | ||
), | ||
migrations.AddConstraint( | ||
model_name="ngo", | ||
constraint=models.UniqueConstraint( | ||
django.db.models.functions.text.Lower("form_url"), name="form_url_unique" | ||
), | ||
), | ||
] |
17 changes: 17 additions & 0 deletions
17
backend/donations/migrations/0005_rename_personal_identifier_donor_cnp.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,17 @@ | ||
# Generated by Django 4.2.9 on 2024-01-10 06:07 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("donations", "0004_ngo_image_ngo_logo_alter_ngo_form_url_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name="donor", | ||
old_name="personal_identifier", | ||
new_name="cnp", | ||
), | ||
] |
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,23 @@ | ||
# Generated by Django 4.2.9 on 2024-01-11 05:34 | ||
|
||
from django.db import migrations, models | ||
import donations.models | ||
import functools | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("donations", "0005_rename_personal_identifier_donor_cnp"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="donor", | ||
name="pdf_file", | ||
field=models.FileField( | ||
blank=True, | ||
upload_to=functools.partial(donations.models.year_directory_path, *("documents",), **{}), | ||
verbose_name="PDF file", | ||
), | ||
), | ||
] |
55 changes: 55 additions & 0 deletions
55
backend/donations/migrations/0007_remove_ngo_form_url_unique_ngo_custom_form_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,55 @@ | ||
# Generated by Django 4.2.9 on 2024-01-11 11:38 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.functions.text | ||
import donations.models | ||
import functools | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("donations", "0006_donor_pdf_file"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveConstraint( | ||
model_name="ngo", | ||
name="form_url_unique", | ||
), | ||
migrations.AddField( | ||
model_name="ngo", | ||
name="custom_form", | ||
field=models.FileField( | ||
blank=True, | ||
storage=donations.models.select_public_storage, | ||
upload_to=functools.partial(donations.models.ngo_directory_path, *("forms",), **{}), | ||
verbose_name="form with ngo data", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="ngo", | ||
name="date_updated", | ||
field=models.DateTimeField(auto_now=True, db_index=True, verbose_name="date updated"), | ||
), | ||
migrations.AddField( | ||
model_name="ngo", | ||
name="slug", | ||
field=models.SlugField( | ||
default="", | ||
max_length=100, | ||
unique=True, | ||
validators=[donations.models.ngo_identifier_validator], | ||
verbose_name="slug", | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AlterField( | ||
model_name="ngo", | ||
name="form_url", | ||
field=models.URLField(blank=True, default="", max_length=255, verbose_name="form url"), | ||
), | ||
migrations.AddConstraint( | ||
model_name="ngo", | ||
constraint=models.UniqueConstraint(django.db.models.functions.text.Lower("slug"), name="slug__unique"), | ||
), | ||
] |
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.