Mercurial > libervia-web
comparison src/server/pages.py @ 1049:6b1e1f13a299
pages: do not log error if there is not template and render method, but redirect is used
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 25 Jan 2018 07:54:27 +0100 |
parents | 688b52897ba0 |
children | cdf0ebed9db7 |
comparison
equal
deleted
inserted
replaced
1048:d4290178662c | 1049:6b1e1f13a299 |
---|---|
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 None: |
206 if not callable(render): | 206 if self.redirect is None and not callable(render): |
207 log.error(_(u"render must be implemented and callable if template is not set")) | 207 log.error(_(u"render must be implemented and callable if template is not set")) |
208 else: | 208 else: |
209 if render is not None: | 209 if render is not None: |
210 log.error(_(u"render can't be used at the same time as template")) | 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): | 211 if parse_url is not None and not callable(parse_url): |