Skip to content

using custom folder #18

Description

@boubouhkarim

Hi,
i like the idea of this extension,

i know it requires that the plugin folder must be in the root directory of my flask app,

I did some tweaks to init_app function in init.py file

self.plugin_folder = os.path.join(self.app.root_path, plugin_folder) base_plugin_folder = self.plugin_folder.split(os.sep)[-1] self.base_plugin_package = ".".join( [base_app_folder, base_plugin_folder] )

and in my main.py file i can init the app with

plugin_manager.init_app( app, base_app_folder='app', plugin_folder="app/plugins" )

but i get into a strange error that the application context is empty !

when i run flask dev server
i have this error

ctx.app.extensions.get('plugin_manager')._event_manager.connect( AttributeError: 'NoneType' object has no attribute 'app'

any help please !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions