From 999b052fe5b674f2928b67cb91762b16e4d5b137 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Fri, 22 Aug 2014 09:18:00 +1000 Subject: [PATCH] Fix indentation of docstings --- wagtail/wagtailcore/models.py | 34 +++++++++++++++++----------------- wagtail/wagtailcore/utils.py | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/wagtail/wagtailcore/models.py b/wagtail/wagtailcore/models.py index dd1bdb52c..1fa436014 100644 --- a/wagtail/wagtailcore/models.py +++ b/wagtail/wagtailcore/models.py @@ -58,15 +58,15 @@ class Site(models.Model): @staticmethod def find_for_request(request): """ - Find the site object responsible for responding to this HTTP - request object. Try: - - unique hostname first - - then hostname and port - - if there is no matching hostname at all, or no matching - hostname:port combination, fall back to the unique default site, - or raise an exception - NB this means that high-numbered ports on an extant hostname may - still be routed to a different hostname which is set as the default + Find the site object responsible for responding to this HTTP + request object. Try: + - unique hostname first + - then hostname and port + - if there is no matching hostname at all, or no matching + hostname:port combination, fall back to the unique default site, + or raise an exception + NB this means that high-numbered ports on an extant hostname may + still be routed to a different hostname which is set as the default """ try: hostname = request.META['HTTP_HOST'].split(':')[0] # KeyError here goes to the final except clause @@ -505,8 +505,8 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed @classmethod def clean_subpage_types(cls): """ - Returns the list of subpage types, with strings converted to class objects - where required + Returns the list of subpage types, with strings converted to class objects + where required """ if cls._clean_subpage_types is None: subpage_types = getattr(cls, 'subpage_types', None) @@ -528,8 +528,8 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed @classmethod def clean_parent_page_types(cls): """ - Returns the list of parent page types, with strings converted to - class objects where required + Returns the list of parent page types, with strings converted to class + objects where required """ if cls._clean_parent_page_types is None: parent_page_types = getattr(cls, 'parent_page_types', None) @@ -551,7 +551,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed @classmethod def allowed_parent_page_types(cls): """ - Returns the list of page types that this page type can be a subpage of + Returns the list of page types that this page type can be a subpage of """ cls_ct = ContentType.objects.get_for_model(cls) return [ct for ct in cls.clean_parent_page_types() @@ -560,7 +560,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed @classmethod def allowed_subpage_types(cls): """ - Returns the list of page types that this page type can be a subpage of + Returns the list of page types that this page type can be a subpage of """ # Special case the 'Page' class, such as the Root page or Home page - # otherwise you can not add initial pages when setting up a site @@ -574,14 +574,14 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed @classmethod def allowed_parent_pages(cls): """ - Returns the list of pages that this page type can be a subpage of + Returns the list of pages that this page type can be a subpage of """ return Page.objects.filter(content_type__in=cls.allowed_parent_page_types()) @classmethod def allowed_subpages(cls): """ - Returns the list of pages that this page type can be a parent page of + Returns the list of pages that this page type can be a parent page of """ return Page.objects.filter(content_type__in=cls.allowed_subpage_types()) diff --git a/wagtail/wagtailcore/utils.py b/wagtail/wagtailcore/utils.py index 37691f547..52913beda 100644 --- a/wagtail/wagtailcore/utils.py +++ b/wagtail/wagtailcore/utils.py @@ -11,8 +11,8 @@ def camelcase_to_underscore(str): def resolve_model_string(model_string, default_app): """ - Resolve an 'app_label.model_name' string in to an actual model class. - If a model class is passed in, just return that. + Resolve an 'app_label.model_name' string in to an actual model class. + If a model class is passed in, just return that. """ if isinstance(model_string, string_types): try: