Fix typo / PEP8

This commit is contained in:
Matt Westcott 2015-10-20 14:37:57 +01:00
parent 8c114c1334
commit f8a1627ff7

View file

@ -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