Skip to content

Introduce an init_app(app) for factory pattern#31

Merged
rayluo merged 1 commit into
devfrom
flask-factory
Jun 23, 2024
Merged

Introduce an init_app(app) for factory pattern#31
rayluo merged 1 commit into
devfrom
flask-factory

Conversation

@rayluo

@rayluo rayluo commented Jun 10, 2024

Copy link
Copy Markdown
Owner

This proof-of-concept may close #24. See if that meets your need, @pamelafox . If it looks good, I will see if I can apply same changes to Quart.

Comment thread identity/flask.py Outdated

@pamelafox pamelafox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! The init_app method is how I often initiate other extensions, so this seems right? I assume you've tried this out in a Flask app.

@joaooliveira-proof

joaooliveira-proof commented Jun 12, 2024

Copy link
Copy Markdown

I've tested in my app, worked like a charm. Except that the linter did not like that I was passing None to Auth.

@rayluo

rayluo commented Jun 16, 2024

Copy link
Copy Markdown
Owner Author

Polished the previous proof-of-concept (PoC), and applied it to Quart, manually tested with my two samples (which will be pushed soon in their own PRs in different repos).

@joaooliveira-proof , if you are still interested, please pull the latest branch and test it again. It shall be a drop-in replacement of the previous PoC, except that the linter shall be happy now. :-)

@rayluo rayluo marked this pull request as ready for review June 16, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document how to use Flask decorator with AppFactory/Blueprint pattern

3 participants