def for_request(self, request, raise404=False, best_match=False, path=None):
        """
        Return a page for the request

        Does not hit the database more than once for the same request.

        Examples::

            Page.objects.for_request(request, raise404=True, best_match=False)

        Defaults to raising a ``DoesNotExist`` exception if no exact match
        could be determined.
        """

        if not hasattr(request, "_feincms_page"):
            path = path or request.path_info or request.path

            if best_match:
                request._feincms_page = self.best_match_for_path(
                    path, raise404=raise404
                )
            else:
                request._feincms_page = self.page_for_path(path, raise404=raise404)

        return request._feincms_page

        Return a page for the request

        Does not hit the database more than once for the same request.

        Examples::

            Page.objects.for_request(request, raise404=True, best_match=False)

        Defaults to raising a ``DoesNotExist`` exception if no exact match
        could be determined.
        
feincms/module/page/models.py