def app_view_factory(qs):
 return functools.partial(app_view, qs=qs)

def app_view_factory ( qs ) : return functools . partial ( app_view , qs = qs )
dont evaluate qs or the locale will get stuck on whatever the server starts with .