Skip to content

Commit

Permalink
Remove TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Nov 1, 2024
1 parent 603240c commit ae1fbd6
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 365 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ dist
# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
# vuepress v2.x temporary and cache directory
.temp

# Docusaurus cache and generated files
Expand Down
2 changes: 0 additions & 2 deletions backend/donations/models/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,6 @@ class Donor(models.Model):

ngo = models.ForeignKey(Ngo, verbose_name=_("NGO"), on_delete=models.SET_NULL, db_index=True, null=True)

# TODO: first name and last name have been swapped
# https://github.com/code4romania/redirectioneaza/issues/269
l_name = models.CharField(verbose_name=_("last name"), blank=True, null=False, default="", max_length=100)
f_name = models.CharField(verbose_name=_("first name"), blank=True, null=False, default="", max_length=100)
initial = models.CharField(verbose_name=_("initials"), blank=True, null=False, default="", max_length=5)
Expand Down
14 changes: 9 additions & 5 deletions backend/donations/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from io import BytesIO
from typing import Dict

from django.templatetags.static import static
from pypdf import PdfReader, PdfWriter
from reportlab.graphics import renderPDF
from reportlab.lib.pagesizes import A4
Expand All @@ -15,13 +16,16 @@
from reportlab.pdfgen.canvas import Canvas
from svglib.svglib import svg2rlg

abs_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
# TODO: we might need to rethink this; we should not hardcode the path to static_extras
font_path = abs_path + "/static_extras/font/opensans.ttf"
pdfmetrics.registerFont(TTFont("OpenSans", font_path))
form_image_path = static("images/formular-2021.jpg")
font_path = static("font/opensans.ttf")
if font_path.startswith("/"):
abs_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))

form_image_path = os.path.join(abs_path, form_image_path[1:])
font_path = os.path.join(abs_path, font_path[1:])

default_font_size = 15
form_image_path = abs_path + "/static_extras/images/formular-2021.jpg"
pdfmetrics.registerFont(TTFont("OpenSans", font_path))


def format_ngo_account(ngo_account: str):
Expand Down
2 changes: 0 additions & 2 deletions backend/donations/views/donations_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ def _package_donations(tmp_dir_name: str, donations: QuerySet[Donor], ngo: Ngo,
detailed_address: Dict = _get_address_details(donation_object)
donations_data.append(
{
# TODO: first name and last name have been swapped
# https://github.com/code4romania/redirectioneaza/issues/269
"last_name": donation_object.l_name,
"first_name": donation_object.f_name,
"initial": donation_object.initial,
Expand Down
Empty file removed backend/importer/__init__.py
Empty file.
8 changes: 0 additions & 8 deletions backend/importer/apps.py

This file was deleted.

66 changes: 0 additions & 66 deletions backend/importer/extract.py

This file was deleted.

48 changes: 0 additions & 48 deletions backend/importer/migrations/0001_initial.py

This file was deleted.

27 changes: 0 additions & 27 deletions backend/importer/migrations/0002_alter_importjob_import_type.py

This file was deleted.

18 changes: 0 additions & 18 deletions backend/importer/migrations/0003_alter_importjob_csv_file.py

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions backend/importer/migrations/0005_delete_importjob.py

This file was deleted.

Empty file.
Empty file removed backend/importer/tasks/__init__.py
Empty file.
62 changes: 0 additions & 62 deletions backend/importer/tasks/donor_forms.py

This file was deleted.

Loading

0 comments on commit ae1fbd6

Please sign in to comment.