clokep / django-querysetsequence

Chain multiple (disparate) QuerySets in Django
https://django-querysetsequence.readthedocs.io/
ISC License
107 stars 25 forks source link

Fixes for a model being used multiple times #16

Closed clokep closed 7 years ago

clokep commented 7 years ago

The previous implementation of adding the # property would cause a model to share it across all instances (essentially polluting global scope). This PR fixes this by creating a Proxy model and setting the attribute on that instead.

This allows a model to be used in multiple QuerySetSequence objects at once (or multiple in the same QuerySetSequence).