What is the best-practice pattern to replace/extend functionality in django.contrib
libraries?
My use case in this instance is to add domain alias awareness to the contrib.sites
library. I've already created a customized sites library that incorporates the additional model updates and logic we need, but other third-party libraries we use (allauth, for example) are directly calling django.django.contrib.sites.models.objects.get_current()
. We've begun maintaining a local fork of each of these libraries to update the call to point to our customized sites lib instead. Is there a more efficient solution for this?