You can create two virtual environment with different versions of DRF installed. But, I am not sure how would one route which endpoint to which virtualenv. Also, the WSGI Server needs to support two envs for the same project. Not sure if its possible.
One work around could be the following - Have the old codebase as a separate project. All the new endpoints goes into a new and separate project. You can serve both the projects using the same nginx server. The gunicorn instance running for the two projects would be different. That way you could migrate drf2 endpoints to drf3 endpoints gradually without breaking any code. In a nutshell, drf2 project will have its own urls and drf3 project would have its own urls. Regards, Chetan Ganji +91-900-483-4183 [email protected] http://ryucoder.in On Fri, Mar 15, 2019 at 5:53 PM Jimmy Gawain <[email protected]> wrote: > Is it possible to have both DRF2 and DRF3 installed simultaneously in a > project? > > We have a pretty large codebase that has been stuck on DRF2. > Migrating to DRF3 has been on our to-do list for a long time but > allocating resources to do a complete conversion in one-swoop has thus far > been out of reach. > > If we could have both versions available in a project we'd be able to > publish new code in DRF3 while migrating existing code on an > endpoint-by-endpoint basis with each release. > > tx. > > -- > You received this message because you are subscribed to the Google Groups > "Django REST framework" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
