Flask-Tenants / flask-tenants

Multitenancy solution using Flask, SQLAlchemy, and PostgreSQL. Please join our Discord server at https://discord.gg/3AV2GkcB2Q.
MIT License
5 stars 4 forks source link

Condense middleware #24

Closed therealwokewok closed 1 month ago

therealwokewok commented 2 months ago

Currently, the middleware is operating as two separate entities wrapped in the create_tenancy function. It would be ideal to condense them into a single function for cleanliness.

This will break implementation, so should be part of the Leviticus release.

therealwokewok commented 2 months ago

Turns out that separation of responsibilities is important for the URLRewriteMiddleware and MultiTenancy middleware to prevent recursion issues. The goal was to modify the module such that implementation was cleaner and that was accomplished by abstracting everything into a FlaskTenants class.