添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account blueprint = Blueprint ( 'api' , __name__ ) api = Api ( blueprint ) app = Quart ( __name__ ) app . register_blueprint ( blueprint )

Repro Steps (if applicable)

  • start the app
  • Expected Behavior

    App starts successfully

    Actual Behavior

    An exception occurs

    Error Messages/Stack Trace

    Traceback (most recent call last):
      File "manage.py", line 20, in <module>
        app.register_blueprint(blueprint)
      File "C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\auto-test-system-4gCsnwKR-py3.7\lib\site-packages\quart\app.py", line 1422, in register_blueprint
        blueprint.register(self, first_registration, url_prefix=url_prefix)
      File "C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\auto-test-system-4gCsnwKR-py3.7\lib\site-packages\quart\blueprints.py", line 755, in register
        func(state)
      File "C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\auto-test-system-4gCsnwKR-py3.7\lib\site-packages\flask_restx\api.py", line 840, in _deferred_blueprint_init
        self._init_app(setup_state.app)
      File "C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\auto-test-system-4gCsnwKR-py3.7\lib\site-packages\flask_restx\api.py", line 228, in _init_app
        self._register_specs(self.blueprint or app)
      File "C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\auto-test-system-4gCsnwKR-py3.7\lib\site-packages\flask_restx\api.py", line 285, in _register_specs
        resource_class_args=(self,),
      File "C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\auto-test-system-4gCsnwKR-py3.7\lib\site-packages\flask_restx\api.py", line 349, in _register_view
        url, view_func=resource_func, **kwargs
      File "C:\Users\username\AppData\Local\pypoetry\Cache\virtualenvs\auto-test-system-4gCsnwKR-py3.7\lib\site-packages\flask_restx\api.py", line 803, in _blueprint_setup_add_url_rule_patch
        options.setdefault("subdomain", blueprint_setup.subdomain)
    AttributeError: 'BlueprintSetupState' object has no attribute 'subdomain'
    

    Environment

  • Python 3.7
  • Quart 0.11.3
  • Flask-RESTX 0.2.0
  • Other installed Flask extensions
  • Additional Context

    I know it's due to the different implementations between Flask and Quart, espacially add_url_rule in this case, and I understand Quart is not flask-restx's target. But by any chance to bring this excellent extenstion to Quart would be great and should be easy. Thansk a lot.