def indicoErrorWebpage(status): """ Calls the tpl containing the error webpage. Returns a string with the error webpage we want to generate. """ from MaKaC.webinterface.pages.error import WErrorWSGI from MaKaC.i18n import _ errorTitleText = (_("Page not found"), _("The page you were looking for doesn't exist.")) if status != 404: errorTitleText = (_("%s" % (HTTP_STATUS_MAP.get(status, "Unknown error"))), "An unexpected error ocurred.") wsError = WErrorWSGI(errorTitleText) return wsError.getHTML()
def set_status(self, status): self.__status = "%s %s" % (status, HTTP_STATUS_MAP.get(int(status), "Explanation not available"))
def set_status(self, status): self.__status = '%s %s' % (status, HTTP_STATUS_MAP.get(int(status), 'Explanation not available'))
def set_status(self, status): self.__status = '%s %s' % ( status, HTTP_STATUS_MAP.get(int(status), 'Explanation not available'))