-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(templates): correct file naming issue, template paths, and method…
… naming - Fixed an issue where `quotation.html` files could not be found by renaming templates: - `quotation1.html` -> `quotation_1.html` - `quotation2.html` -> `quotation_2.html` - `quotation3.html` -> `quotation_3.html` - `quotation4.html` -> `quotation_4.html` - Refactored variable names in the invoice creation service: - Renamed `custom_template_dir` to `sage_template_dir` - Renamed `custom_template_prefix` to `sage_template_prefix` - Updated method name in `invoice_create.py`: - Renamed `render_contax` to `render_context` - Modified the migration file (`0002_alter_invoice_template_choice.py`) to accommodate template changes. - Updated related test cases in `test_service.py` to reflect the renaming. - Made necessary adjustments in `views/invoice.py` to align with the template changes.
- Loading branch information
Showing
9 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
sage_invoice/migrations/0002_alter_invoice_template_choice.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,32 @@ | ||
# Generated by Django 5.1.2 on 2024-10-17 09:47 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("sage_invoice", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="invoice", | ||
name="template_choice", | ||
field=models.CharField( | ||
choices=[ | ||
("quotation_1", "quotation_1"), | ||
("quotation_2", "quotation_2"), | ||
("quotation_3", "quotation_3"), | ||
("quotation_4", "quotation_4"), | ||
("receipt1", "receipt1"), | ||
("receipt2", "receipt2"), | ||
("receipt3", "receipt3"), | ||
], | ||
db_comment="Template choice for the invoice", | ||
help_text="The template you want for your invoice", | ||
max_length=20, | ||
verbose_name="Template choice", | ||
), | ||
), | ||
] |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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