Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenhesselink committed Jul 25, 2024
1 parent ad6a689 commit 0b326b6
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 27 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion sandbox/example_project/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@
# Add external link to richtext features
RICHTEXT_FEATURES = [
"new_tab_link",
]
]
5 changes: 2 additions & 3 deletions sandbox/example_project/urls.py
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
10 changes: 5 additions & 5 deletions sandbox/home/migrations/0002_homepage_body.py
Original file line number Diff line number Diff line change
@@ -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,
),
]
9 changes: 3 additions & 6 deletions sandbox/home/models.py
Original file line number Diff line number Diff line change
@@ -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")]
24 changes: 17 additions & 7 deletions test_project/test_app/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
# 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):

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",),
),
]
6 changes: 2 additions & 4 deletions test_project/urls.py
Original file line number Diff line number Diff line change
@@ -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)),
Expand Down

0 comments on commit 0b326b6

Please sign in to comment.