-
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.
- Loading branch information
1 parent
d80d424
commit d2a7d2d
Showing
38 changed files
with
517 additions
and
121 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
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+43.5 KB
fiduswriter/book/fixtures/media/book-style-files/CrimsonText-Bold.woff
Binary file not shown.
Binary file added
BIN
+38.4 KB
fiduswriter/book/fixtures/media/book-style-files/CrimsonText-BoldItalic.woff
Binary file not shown.
Binary file added
BIN
+54.2 KB
fiduswriter/book/fixtures/media/book-style-files/CrimsonText-Italic.woff
Binary file not shown.
Binary file added
BIN
+93.3 KB
fiduswriter/book/fixtures/media/book-style-files/CrimsonText-Roman.woff
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+40.1 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Bold.woff
Binary file not shown.
Binary file added
BIN
+36.6 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-BoldItalic.woff
Binary file not shown.
Binary file added
BIN
+36.6 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-BoldItalic_crtDjCs.woff
Binary file not shown.
Binary file added
BIN
+36.6 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-BoldItalic_yO6HqH2.woff
Binary file not shown.
Binary file added
BIN
+40.1 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Bold_9HCH4bJ.woff
Binary file not shown.
Binary file added
BIN
+40.1 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Bold_rB1dJdY.woff
Binary file not shown.
Binary file added
BIN
+36.5 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Italic.woff
Binary file not shown.
Binary file added
BIN
+36.5 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Italic_OL1vKDc.woff
Binary file not shown.
Binary file added
BIN
+36.5 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Italic_ZMVQrVq.woff
Binary file not shown.
Binary file added
BIN
+40.6 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Regular.woff
Binary file not shown.
Binary file added
BIN
+40.6 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Regular_mqEfVcK.woff
Binary file not shown.
Binary file added
BIN
+40.6 KB
fiduswriter/book/fixtures/media/book-style-files/NoticiaText-Regular_t56TEHe.woff
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+91.8 KB
fiduswriter/book/fixtures/media/book-style-files/OpenSans-Regular.woff
Binary file not shown.
Binary file added
BIN
+61.8 KB
fiduswriter/book/fixtures/media/book-style-files/SourceSansPro-Bold.woff
Binary file not shown.
Binary file added
BIN
+61.8 KB
fiduswriter/book/fixtures/media/book-style-files/SourceSansPro-Bold_kmw0DlW.woff
Binary file not shown.
52 changes: 52 additions & 0 deletions
52
fiduswriter/book/migrations/0007_bookstyle_bookstylefile.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,52 @@ | ||
# Generated by Django 2.2.4 on 2019-08-31 22:40 | ||
import os | ||
import book.models | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
from django.core.management import call_command | ||
|
||
|
||
fixture_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../fixtures')) | ||
fixture_filename = 'initial_data.json' | ||
|
||
|
||
def load_fixture(apps, schema_editor): | ||
fixture_file = os.path.join(fixture_dir, fixture_filename) | ||
call_command('loaddata', fixture_file) | ||
|
||
|
||
def unload_fixture(apps, schema_editor): | ||
BookStyle = apps.get_model("book", "BookStyle") | ||
BookStyle.objects.all().delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('book', '0006_auto_20190622_2126'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='BookStyle', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', models.CharField(default='Default', help_text='The human readable title.', max_length=128)), | ||
('slug', models.SlugField(default='default', help_text='The base of the filenames the style occupies.', max_length=20, unique=True)), | ||
('contents', models.TextField(default='', help_text='The CSS style definiton.')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='BookStyleFile', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('file', models.FileField(help_text='A file references in the style. The filename will be replaced with the final url of the file in the style.', upload_to=book.models.bookstylefile_location)), | ||
('filename', models.CharField(help_text='The original filename.', max_length=255)), | ||
('style', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.BookStyle')), | ||
], | ||
options={ | ||
'unique_together': {('filename', 'style')}, | ||
}, | ||
), | ||
migrations.RunPython(load_fixture, reverse_code=unload_fixture), | ||
] |
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
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.