-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from chnm/feature/wagtail
Adding Wagtail support for editable pages
- Loading branch information
Showing
16 changed files
with
533 additions
and
25 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 5.0.2 on 2024-08-27 19:51 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("manuscript", "0098_linecode_associated_folio"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="location", | ||
name="country", | ||
field=models.CharField( | ||
blank=True, max_length=255, null=True, verbose_name="Modern location" | ||
), | ||
), | ||
] |
Empty file.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class PagesConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "pages" |
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,58 @@ | ||
# Generated by Django 5.0.2 on 2024-08-27 19:26 | ||
|
||
import django.db.models.deletion | ||
import wagtail.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
initial = True | ||
|
||
dependencies = [ | ||
("wagtailcore", "0094_alter_page_locale"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="AboutPage", | ||
fields=[ | ||
( | ||
"page_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="wagtailcore.page", | ||
), | ||
), | ||
("body", wagtail.fields.RichTextField(blank=True)), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
bases=("wagtailcore.page",), | ||
), | ||
migrations.CreateModel( | ||
name="SpecificationsPage", | ||
fields=[ | ||
( | ||
"page_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="wagtailcore.page", | ||
), | ||
), | ||
("body", wagtail.fields.RichTextField(blank=True)), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
bases=("wagtailcore.page",), | ||
), | ||
] |
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,18 @@ | ||
# Generated by Django 5.0.2 on 2024-08-27 19:51 | ||
|
||
import wagtail.fields | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("pages", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="aboutpage", | ||
name="team", | ||
field=wagtail.fields.RichTextField(blank=True), | ||
), | ||
] |
39 changes: 39 additions & 0 deletions
39
pages/migrations/0003_sitepage_delete_specificationspage.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,39 @@ | ||
# Generated by Django 5.0.2 on 2024-08-27 20:17 | ||
|
||
import django.db.models.deletion | ||
import wagtail.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("pages", "0002_aboutpage_team"), | ||
("wagtailcore", "0094_alter_page_locale"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="SitePage", | ||
fields=[ | ||
( | ||
"page_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="wagtailcore.page", | ||
), | ||
), | ||
("body", wagtail.fields.RichTextField(blank=True)), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
bases=("wagtailcore.page",), | ||
), | ||
migrations.DeleteModel( | ||
name="SpecificationsPage", | ||
), | ||
] |
Empty file.
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,21 @@ | ||
from wagtail.admin.panels import FieldPanel | ||
from wagtail.contrib.routable_page.models import RoutablePageMixin, route | ||
from wagtail.fields import RichTextField | ||
from wagtail.models import Page | ||
|
||
|
||
class AboutPage(RoutablePageMixin, Page): | ||
body = RichTextField(blank=True) | ||
team = RichTextField(blank=True) | ||
|
||
content_panels = Page.content_panels + [ | ||
FieldPanel("body", classname="full"), | ||
FieldPanel("team", classname="full"), | ||
] | ||
|
||
|
||
class SitePage(Page): | ||
body = RichTextField(blank=True) | ||
content_panels = Page.content_panels + [ | ||
FieldPanel("body", classname="full"), | ||
] |
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
Oops, something went wrong.