예제 #1
0
파일: wrappers.py 프로젝트: jas01/indico
 def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
     from indico.web.rh import RHSimple
     # Endpoints from Flask-Multipass need to be wrapped in the RH
     # logic to get the autocommit logic and error handling for code
     # running inside the identity handler.
     if endpoint is not None and endpoint.startswith('_flaskmultipass'):
         view_func = RHSimple.wrap_function(view_func)
     return super(IndicoFlask, self).add_url_rule(rule, endpoint=endpoint, view_func=view_func, **options)
예제 #2
0
 def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
     from indico.web.rh import RHSimple
     # Endpoints from Flask-Multipass need to be wrapped in the RH
     # logic to get the autocommit logic and error handling for code
     # running inside the identity handler.
     if endpoint is not None and endpoint.startswith('_flaskmultipass'):
         view_func = RHSimple.wrap_function(view_func)
     return super(IndicoFlask, self).add_url_rule(rule, endpoint=endpoint, view_func=view_func, **options)