from typing import Dict
from quart import g

def register(app):
    @app.template_filter("qs")
    def qs_filter(dict: Dict):
      if getattr(g, "makeqs_factory", False):
        q= g.makeqs_factory()(
          **dict,
        )
        return q
      else:
        return ""
