Skip to content

Commit

Permalink
Revert "Added api fields to StandardPages"
Browse files Browse the repository at this point in the history
This reverts commit 39a04f1.
  • Loading branch information
Ole Kristian Losvik committed Dec 4, 2019
1 parent 095be6a commit 43afaa9
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions website/standardpages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
from wagtail.admin.edit_handlers import (FieldPanel, InlinePanel,
MultiFieldPanel, PageChooserPanel,
StreamFieldPanel)
from wagtail.api import APIField
from wagtail.core.fields import StreamField
from wagtail.core.models import Orderable
from wagtail.images.api.fields import ImageRenditionField
from wagtail.images.edit_handlers import ImageChooserPanel
from wagtail.search import index

from grapple.models import GraphQLImage, GraphQLStreamfield, GraphQLString
from grapple.models import GraphQLStreamfield, GraphQLString

from website.utils.blocks import StoryBlock
from website.utils.models import BasePage, RelatedPage
Expand Down Expand Up @@ -64,19 +62,9 @@ class StandardPage(BasePage):
InlinePanel('authors', label="Authors"),
]

# Export fields over REST API
api_fields = [
APIField('introduction'),
APIField('body'),
APIField('featured_image', serializer=ImageRenditionField('fill-1920x1080')),
APIField('featured_image_caption'),
]

graphql_fields = [
GraphQLString("introduction"),
GraphQLStreamfield("body"),
GraphQLImage("featured_image"),
GraphQLString("featured_image_caption"),
]

class Meta:
Expand Down

0 comments on commit 43afaa9

Please sign in to comment.