2 ms·
Both frameworks can coexist in the same codebase if you use the WSGIMiddleware module [0]. It's a bit easier to get it running with Flask than with Django. The
by wilsonfiifi 5y ago
Both frameworks can coexist in the same codebase if you use the WSGIMiddleware module [0]. It's a bit easier to get it running with Flask than with Django. The issue with Django is getting the static assets to work. The easiest way I've found is to run collectstatic in Django and serve the output folder through FastAPI.
[0] https://fastapi.tiangolo.com/advanced/wsgi/ https://fastapi.tiangolo.com/advanced/wsgi/