Format code with isort

pull/352/head
Sage Abdullah 2022-07-26 10:20:15 +07:00 zatwierdzone przez Karl Hobley
rodzic 40696f941c
commit 6732b71983
14 zmienionych plików z 21 dodań i 42 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
from wagtail.api.v2.views import PagesAPIViewSet
from wagtail.api.v2.router import WagtailAPIRouter
from wagtail.images.api.v2.views import ImagesAPIViewSet
from wagtail.api.v2.views import PagesAPIViewSet
from wagtail.documents.api.v2.views import DocumentsAPIViewSet
from wagtail.images.api.v2.views import ImagesAPIViewSet
# Create the router. "wagtailapi" is the URL namespace
api_router = WagtailAPIRouter("wagtailapi")

Wyświetl plik

@ -1,5 +1,3 @@
from wagtail.images.blocks import ImageChooserBlock
from wagtail.embeds.blocks import EmbedBlock
from wagtail.blocks import (
CharBlock,
ChoiceBlock,
@ -8,6 +6,8 @@ from wagtail.blocks import (
StructBlock,
TextBlock,
)
from wagtail.embeds.blocks import EmbedBlock
from wagtail.images.blocks import ImageChooserBlock
class ImageBlock(StructBlock):

Wyświetl plik

@ -1,11 +1,10 @@
import os
from django.conf import settings
from django.core.files.storage import default_storage, FileSystemStorage
from django.core.management.base import BaseCommand
from django.core.files.storage import FileSystemStorage, default_storage
from django.core.management import call_command
from wagtail.models import Site, Page
from django.core.management.base import BaseCommand
from wagtail.models import Page, Site
class Command(BaseCommand):

Wyświetl plik

@ -1,19 +1,12 @@
from __future__ import unicode_literals
from django.db import models
from modelcluster.fields import ParentalKey
from modelcluster.models import ClusterableModel
from wagtail.admin.panels import (
FieldPanel,
FieldRowPanel,
InlinePanel,
MultiFieldPanel,
)
from wagtail.admin.panels import FieldPanel, FieldRowPanel, InlinePanel, MultiFieldPanel
from wagtail.contrib.forms.models import AbstractEmailForm, AbstractFormField
from wagtail.fields import RichTextField, StreamField
from wagtail.models import Collection, Page
from wagtail.contrib.forms.models import AbstractEmailForm, AbstractFormField
from wagtail.search import index
from wagtail.snippets.models import register_snippet

Wyświetl plik

@ -1,5 +1,4 @@
from django import template
from wagtail.images.models import Image
register = template.Library()

Wyświetl plik

@ -1,10 +1,8 @@
from django import template
from wagtail.models import Page, Site
from bakerydemo.base.models import FooterText
register = template.Library()
# https://docs.djangoproject.com/en/3.2/howto/custom-template-tags/

Wyświetl plik

@ -4,8 +4,8 @@ from wagtail.contrib.modeladmin.options import (
modeladmin_register,
)
from bakerydemo.breads.models import Country, BreadIngredient, BreadType
from bakerydemo.base.models import People, FooterText
from bakerydemo.base.models import FooterText, People
from bakerydemo.breads.models import BreadIngredient, BreadType, Country
"""
N.B. To see what icons are available for use in Wagtail menus and StreamField block types,

Wyświetl plik

@ -3,16 +3,13 @@ from __future__ import unicode_literals
from django.contrib import messages
from django.db import models
from django.shortcuts import redirect, render
from modelcluster.contrib.taggit import ClusterTaggableManager
from modelcluster.fields import ParentalKey
from taggit.models import Tag, TaggedItemBase
from wagtail.contrib.routable_page.models import RoutablePageMixin, route
from wagtail.admin.panels import FieldPanel, InlinePanel
from wagtail.contrib.routable_page.models import RoutablePageMixin, route
from wagtail.fields import StreamField
from wagtail.models import Page, Orderable
from wagtail.models import Orderable, Page
from wagtail.search import index
from bakerydemo.base.blocks import BaseStreamBlock

Wyświetl plik

@ -1,9 +1,7 @@
from django import forms
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.db import models
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from modelcluster.fields import ParentalManyToManyField
from wagtail.admin.panels import FieldPanel, MultiFieldPanel
from wagtail.fields import StreamField
from wagtail.models import Page

Wyświetl plik

@ -3,11 +3,9 @@ from datetime import datetime
from django.conf import settings
from django.core.validators import RegexValidator
from django.db import models
from modelcluster.fields import ParentalKey
from wagtail.fields import StreamField
from wagtail.admin.panels import FieldPanel, InlinePanel
from wagtail.fields import StreamField
from wagtail.models import Orderable, Page
from wagtail.search import index

Wyświetl plik

@ -1,7 +1,6 @@
from django.conf import settings
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.models import Page
from wagtail.search.models import Query

Wyświetl plik

@ -1,14 +1,14 @@
import debug_toolbar
from django.conf import settings
from django.contrib import admin
from django.urls import include, path
import debug_toolbar
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.contrib.sitemaps.views import sitemap
from wagtail import urls as wagtail_urls
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.contrib.sitemaps.views import sitemap
from wagtail.documents import urls as wagtaildocs_urls
from bakerydemo.search import views as search_views
from .api import api_router
urlpatterns = [

Wyświetl plik

@ -12,7 +12,6 @@ import os
import dotenv
from django.core.wsgi import get_wsgi_application
dotenv.read_dotenv(os.path.join(os.path.dirname(os.path.dirname(__file__)), ".env"))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bakerydemo.settings.dev")

Wyświetl plik

@ -4,7 +4,6 @@ import sys
import dotenv
if __name__ == "__main__":
dotenv.read_dotenv()