From d1ce9d3914010ddc9f177ff7d6c1a407efea5a1b Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 21 Jan 2012 18:36:25 +0000 Subject: [PATCH] More consistent comment style. --- djangorestframework/mixins.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py index 4077b66cd..7f0870f85 100644 --- a/djangorestframework/mixins.py +++ b/djangorestframework/mixins.py @@ -689,7 +689,9 @@ class PaginatorMixin(object): limit = 20 def get_limit(self): - """ Helper method to determine what the `limit` should be """ + """ + Helper method to determine what the `limit` should be + """ try: limit = int(self.request.GET.get('limit', self.limit)) return min(limit, self.limit) @@ -697,7 +699,9 @@ class PaginatorMixin(object): return self.limit def url_with_page_number(self, page_number): - """ Constructs a url used for getting the next/previous urls """ + """ + Constructs a url used for getting the next/previous urls + """ url = URLObject.parse(self.request.get_full_path()) url = url.add_query_param('page', page_number) @@ -708,7 +712,9 @@ class PaginatorMixin(object): return url def next(self, page): - """ Returns a url to the next page of results (if any) """ + """ + Returns a url to the next page of results (if any) + """ if not page.has_next(): return None @@ -722,7 +728,9 @@ class PaginatorMixin(object): return self.url_with_page_number(page.previous_page_number()) def serialize_page_info(self, page): - """ This is some useful information that is added to the response """ + """ + This is some useful information that is added to the response + """ return { 'next': self.next(page), 'page': page.number,