Re: Extending Django: "Adaptation" via Generic Functions

2006-01-24 Thread hugo
>For instance with manipulators, after magic-removal, it will be >elementary to over-ride the Model.AddManipulator(), and >Model.ChangeManipulator(pk). So you could then apply RuleDispatch in >your own model, and not need it built-in to Django at all. You can only override methods that are defin

Re: Extending Django: "Adaptation" via Generic Functions

2006-01-23 Thread Joseph Kocherhans
On 1/23/06, Brant Harris <[EMAIL PROTECTED]> wrote: > > For instance with manipulators, after magic-removal, it will be > elementary to over-ride the Model.AddManipulator(), and > Model.ChangeManipulator(pk). So you could then apply RuleDispatch in > your own model, and not need it built-in to Dj

Re: Extending Django: "Adaptation" via Generic Functions

2006-01-23 Thread Brant Harris
Ian went over the RuleDispatch at the ChiPy meeting a few months back. It's a very interesting technique, certainly. But it's usage is limited in scope, and I think dangerous in appeal. In this case, I think it's better to apply it at the application level, rather than in Django itself. Rather

Re: Extending Django: "Adaptation" via Generic Functions

2006-01-23 Thread Joseph Kocherhans
On 1/23/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 1/23/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > Rather than reserving attribute names in a model instance > > (modelinstance.objects returns a Manager) we could use a combination > > of generic functions and a simple type of a

Re: Extending Django: "Adaptation" via Generic Functions

2006-01-23 Thread Adrian Holovaty
On 1/23/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > Rather than reserving attribute names in a model instance > (modelinstance.objects returns a Manager) we could use a combination > of generic functions and a simple type of adaptation. What real-world problem would this solve? Adrian --

Extending Django: "Adaptation" via Generic Functions

2006-01-23 Thread Joseph Kocherhans
This may be rather confusing for those who aren't familiar with Philip Eby's RuleDispatch package. Feel free to ask questions. I'll answer them as best I can. Rather than reserving attribute names in a model instance (modelinstance.objects returns a Manager) we could use a combination of generic