django-adapters icon indicating copy to clipboard operation
django-adapters copied to clipboard

Plugin interface for external apps !

Open jpic opened this issue 6 years ago • 4 comments

Features a really quantic experience with a duck, and not a duck, at the same time !!!

jpic avatar Mar 12 '18 20:03 jpic

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?

mjtamlyn avatar Mar 13 '18 09:03 mjtamlyn

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

jpic avatar Mar 13 '18 10:03 jpic

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.

mjtamlyn avatar Mar 13 '18 11:03 mjtamlyn

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

jpic avatar Mar 14 '18 01:03 jpic