comparison src/server/pages.py @ 1059:d127a85b2fee

pages: don't log error anymore when empty page_meta.py are used
author Goffi <goffi@goffi.org>
date Tue, 30 Jan 2018 08:15:05 +0100
parents 47c354ca66a3
children f0f7b3324749
comparison
equal deleted inserted replaced
1058:2290b6ec3991 1059:d127a85b2fee
200 self.on_signal = on_signal 200 self.on_signal = on_signal
201 self.url_cache = url_cache 201 self.url_cache = url_cache
202 if access == C.PAGES_ACCESS_NONE: 202 if access == C.PAGES_ACCESS_NONE:
203 # none pages just return a 404, no further check is needed 203 # none pages just return a 404, no further check is needed
204 return 204 return
205 if template is None: 205 if template is not None and render is not None:
206 if self.redirect is None and not callable(render): 206 log.error(_(u"render and template methods can't be used at the same time"))
207 log.error(_(u"render must be implemented and callable if template is not set"))
208 else:
209 if render is not None:
210 log.error(_(u"render can't be used at the same time as template"))
211 if parse_url is not None and not callable(parse_url): 207 if parse_url is not None and not callable(parse_url):
212 log.error(_(u"parse_url must be a callable")) 208 log.error(_(u"parse_url must be a callable"))
213 209
214 # if not None, next rendering will be cached 210 # if not None, next rendering will be cached
215 # it must then contain a list of the the keys to use (without the page instance) 211 # it must then contain a list of the the keys to use (without the page instance)