Commit 9c200545 authored by okhin's avatar okhin

Fixing the PEP8 errors

parent 455eef28
Pipeline #886 canceled with stage
...@@ -35,6 +35,7 @@ from .models import ( ...@@ -35,6 +35,7 @@ from .models import (
from .filters import (ActiveMandateQueryFilterBackend, from .filters import (ActiveMandateQueryFilterBackend,
ActiveConstituencyFilterBackend) ActiveConstituencyFilterBackend)
class DefaultWebPagination(pagination.PageNumberPagination): class DefaultWebPagination(pagination.PageNumberPagination):
default_web_page_size = 10 default_web_page_size = 10
......
...@@ -33,13 +33,16 @@ class ActiveMandateQueryFilterBackend(BaseFilterBackend): ...@@ -33,13 +33,16 @@ class ActiveMandateQueryFilterBackend(BaseFilterBackend):
)).distinct() )).distinct()
return qs return qs
class ActiveConstituencyFilterBackend(BaseFilterBackend): class ActiveConstituencyFilterBackend(BaseFilterBackend):
""" """
A filter which check if a representative is active in a constituency A filter which check if a representative is active in a constituency
the parameter used in the query to filter is, by default, active_constituency. the parameter used in the query to filter is, by default,
active_constituency.
""" """
query_param = getattr(settings, 'ACTIVE_CONSTITUENCY_PARAM', 'active_constituency') query_param = getattr(settings,
'ACTIVE_CONSTITUENCY_PARAM', 'active_constituency')
def filter_queryset(self, request, queryset, view): def filter_queryset(self, request, queryset, view):
qs = queryset qs = queryset
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment