diff --git a/pyproject.toml b/pyproject.toml index 44d1b37..4dd7a8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11" + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12" ] keywords = ["richtext", "external", "link", "wagtail", "newtab", "django"] diff --git a/sandbox/example_project/settings/base.py b/sandbox/example_project/settings/base.py index 860c0ea..df43f43 100644 --- a/sandbox/example_project/settings/base.py +++ b/sandbox/example_project/settings/base.py @@ -169,4 +169,4 @@ # Add external link to richtext features RICHTEXT_FEATURES = [ "new_tab_link", -] \ No newline at end of file +] diff --git a/sandbox/example_project/urls.py b/sandbox/example_project/urls.py index 358613c..1768475 100644 --- a/sandbox/example_project/urls.py +++ b/sandbox/example_project/urls.py @@ -1,9 +1,8 @@ from django.conf import settings -from django.urls import include, path from django.contrib import admin - -from wagtail.admin import urls as wagtailadmin_urls +from django.urls import include, path from wagtail import urls as wagtail_urls +from wagtail.admin import urls as wagtailadmin_urls from wagtail.documents import urls as wagtaildocs_urls urlpatterns = [ diff --git a/sandbox/home/migrations/0002_homepage_body.py b/sandbox/home/migrations/0002_homepage_body.py index ef5dad7..1259ac9 100644 --- a/sandbox/home/migrations/0002_homepage_body.py +++ b/sandbox/home/migrations/0002_homepage_body.py @@ -1,20 +1,20 @@ # Generated by Django 3.2.20 on 2023-07-05 10:55 -from django.db import migrations import wagtail.fields +from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('home', '0001_initial'), + ("home", "0001_initial"), ] operations = [ migrations.AddField( - model_name='homepage', - name='body', - field=wagtail.fields.RichTextField(default='Test'), + model_name="homepage", + name="body", + field=wagtail.fields.RichTextField(default="Test"), preserve_default=False, ), ] diff --git a/sandbox/home/models.py b/sandbox/home/models.py index 57323f4..80014d5 100644 --- a/sandbox/home/models.py +++ b/sandbox/home/models.py @@ -1,12 +1,9 @@ from django.db import models - -from wagtail.models import Page -from wagtail.fields import RichTextField from wagtail.admin.panels import FieldPanel +from wagtail.fields import RichTextField +from wagtail.models import Page class HomePage(Page): body = RichTextField() - content_panels = Page.content_panels + [ - FieldPanel("body") - ] + content_panels = Page.content_panels + [FieldPanel("body")] diff --git a/test_project/test_app/migrations/0001_initial.py b/test_project/test_app/migrations/0001_initial.py index 3e7d367..1863c13 100644 --- a/test_project/test_app/migrations/0001_initial.py +++ b/test_project/test_app/migrations/0001_initial.py @@ -1,8 +1,8 @@ # Generated by Django 4.0.10 on 2023-07-06 07:05 -from django.db import migrations, models import django.db.models.deletion import wagtail.fields +from django.db import migrations, models class Migration(migrations.Migration): @@ -10,19 +10,29 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('wagtailcore', '0069_log_entry_jsonfield'), + ("wagtailcore", "0069_log_entry_jsonfield"), ] operations = [ migrations.CreateModel( - name='TestPage', + name="TestPage", 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()), + ( + "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()), ], options={ - 'abstract': False, + "abstract": False, }, - bases=('wagtailcore.page',), + bases=("wagtailcore.page",), ), ] diff --git a/test_project/urls.py b/test_project/urls.py index 9340108..1768475 100644 --- a/test_project/urls.py +++ b/test_project/urls.py @@ -1,12 +1,10 @@ from django.conf import settings -from django.urls import include, path from django.contrib import admin - -from wagtail.admin import urls as wagtailadmin_urls +from django.urls import include, path from wagtail import urls as wagtail_urls +from wagtail.admin import urls as wagtailadmin_urls from wagtail.documents import urls as wagtaildocs_urls - urlpatterns = [ path("django-admin/", admin.site.urls), path("admin/", include(wagtailadmin_urls)),