django-adapters
django-adapters copied to clipboard
Plugin interface for external apps !
Features a really quantic experience with a duck, and not a duck, at the same time !!!
I don't understand this I'm afraid. It sounds like perhaps you're aiming to change the "standard" introspection process which would make adapters?
Yes, if we're not on this kind of design then it might be possible ?
Example: https://github.com/yourlabs/django-autocomplete-light/pull/983#issuecomment-371825354
Right, got it. This should hopefully be handled by the more flexible "construction" process. Actually monkeypatching changes would ideally still be the devloper's problem, otherwise you run the risk of installing third party apps which change stuff you didn't expect (explicit better than implicit), but a simple way to change the mapping or defaults on a case by case basis is definitely a design goal.
In this case, should the algo allow a recursive iterative callback pattern as such ?
def mutate_please(self):
# naive pseudo code
clone = self.clone() # secure data/schema consistency
mutations = [clone.mutate]
while mutations:
mutations.pop()(mutations)
clone.lock = True
return clone
https://stackoverflow.com/questions/159590/way-to-go-from-recursion-to-iteration