Ticket #1653: ignore_parameters.patch

File ignore_parameters.patch, 0.7 kB (added by chrisz, 7 months ago)

Add tg.ignore_parameters option

  • controllers.py

    old new  
    377377def _execute_func(func, template, format, content_type, mapping, fragment, args, kw): 
    378378    """Call controller method and process it's output.""" 
    379379    if config.get("tg.strict_parameters", False): 
    380         tg_util.remove_keys(kw, ["tg_random", "tg_format"]) 
     380        tg_util.remove_keys(kw, ["tg_random", "tg_format"] 
     381            + config.get("tg.ignore_parameters", [])) 
    381382    else: 
    382383        args, kw = tg_util.adapt_call(func, args, kw) 
    383384    if config.get('server.environment', 'development') == 'development':