-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert HTML + print exporters from DOMExporter to string concatenation
- Loading branch information
1 parent
e1d196a
commit a4be94a
Showing
12 changed files
with
622 additions
and
743 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,30 @@ | ||
# Generated by Django 5.1.2 on 2024-12-10 11:49 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def article_to_doc_selector(apps, schema_editor): | ||
BookStyle = apps.get_model("book", "BookStyle") | ||
for style in BookStyle.objects.all(): | ||
style.contents = style.contents.replace(".article-", ".doc-") | ||
style.save() | ||
|
||
|
||
def doc_to_article_selector(apps, schema_editor): | ||
BookStyle = apps.get_model("book", "BookStyle") | ||
for style in BookStyle.objects.all(): | ||
style.contents = style.contents.replace(".doc-", ".article-") | ||
style.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("book", "0016_book_docx_template"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython( | ||
article_to_doc_selector, | ||
doc_to_article_selector, | ||
), | ||
] |
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
Oops, something went wrong.