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 (
from .filters import (ActiveMandateQueryFilterBackend,
ActiveConstituencyFilterBackend)
class DefaultWebPagination(pagination.PageNumberPagination):
default_web_page_size = 10
......
......@@ -33,13 +33,16 @@ class ActiveMandateQueryFilterBackend(BaseFilterBackend):
)).distinct()
return qs
class ActiveConstituencyFilterBackend(BaseFilterBackend):
"""
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):
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