mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-14 20:10:59 +00:00
Fix typo / PEP8
This commit is contained in:
parent
8c114c1334
commit
f8a1627ff7
1 changed files with 3 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ class BaseAPIEndpoint(GenericViewSet):
|
|||
renderer_classes = [JSONRenderer]
|
||||
|
||||
# The BrowsableAPIRenderer requires rest_framework to be installed
|
||||
# Remove this check in Wagtail 1.4 as rest_framwork will be required
|
||||
# Remove this check in Wagtail 1.4 as rest_framework will be required
|
||||
# RemovedInWagtail14Warning
|
||||
if apps.is_installed('rest_framework'):
|
||||
renderer_classes.append(BrowsableAPIRenderer)
|
||||
|
|
@ -38,7 +38,7 @@ class BaseAPIEndpoint(GenericViewSet):
|
|||
pagination_class = WagtailPagination
|
||||
base_serializer_class = BaseSerializer
|
||||
filter_backends = []
|
||||
model = None # Set on subclass
|
||||
model = None # Set on subclass
|
||||
|
||||
known_query_parameters = frozenset([
|
||||
'limit',
|
||||
|
|
@ -116,7 +116,7 @@ class BaseAPIEndpoint(GenericViewSet):
|
|||
|
||||
# Get all available fields
|
||||
all_fields = self.get_api_fields(model)
|
||||
all_fields = list(OrderedDict.fromkeys(all_fields)) # Removes any duplicates in case the developer put "title" in api_fields
|
||||
all_fields = list(OrderedDict.fromkeys(all_fields)) # Removes any duplicates in case the developer put "title" in api_fields
|
||||
|
||||
if self.action == 'listing_view':
|
||||
# Listing views just show the title field and any other allowed field the user specified
|
||||
|
|
|
|||
Loading…
Reference in a new issue