Re: Magic removal stuff...

2005-12-19 Thread [EMAIL PROTECTED]
Robert Wittams wrote: > I noticed louie requires python 2.4. Django is currently supporting 2.3 > upwards. How hard would it be to support 2.3? Louie 1.0 is now out, and supports both Python 2.3 and Python 2.4: http://cheeseshop.python.org/pypi/Louie

Re: Magic removal stuff...

2005-12-17 Thread Ivan Fedorov
Robert Wittams пишет: > The way that it works now, everything is standard python resolution, > object creation, with the single addition that attributes get to poke at > the class if they want to. > > Anyway, the following look perfectly reasonable and clear to me: > > class Something(Model): >

Re: Magic removal stuff...

2005-12-17 Thread Robert Wittams
Patrick K. O'Brien wrote: > > Robert Wittams wrote: > >>>http://louie.berlios.de/ >> >>Argh, this is getting ridiculous. > > > Oh? Sorry, didn't mean to make things difficult for you... I meant me replying three times to the same message ;-) >>I noticed louie requires python 2.4. Django is

Re: Magic removal stuff...

2005-12-17 Thread Patrick K. O'Brien
Robert Wittams wrote: > > http://louie.berlios.de/ > > Argh, this is getting ridiculous. Oh? Sorry, didn't mean to make things difficult for you... > I noticed louie requires python 2.4. Django is currently supporting 2.3 > upwards. How hard would it be to support 2.3? That shouldn't be too h

Re: Magic removal stuff...

2005-12-17 Thread Patrick K. O'Brien
Robert Wittams wrote: > > The other cool thing is, we can pretend its about Louie Armstrong to fit > in with Django and Ellington ;-) Can anyone guess the *real* inspiration for the name? > Also, an issue I had using pydispatcher was that robustapply.function > does not work with classmethods, I

Re: Magic removal stuff...

2005-12-17 Thread Patrick K. O'Brien
I think using the egg mechanism is going to be much better than including Louie in your SVN repository, even using svn:external. We used to do that with Schevo but now rely exclusively on eggs and the result is much better, imo. -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo

Re: Magic removal stuff...

2005-12-17 Thread Robert Wittams
> > No, the whole point is to write a system for adding extensions to > META. The problem currently is that a model's options aren't > extensible; my idea keeps metadata with metadata. Do you really think that the fields themselves *aren't* metadata? > That's a very good point. > > Howev

Re: Magic removal stuff...

2005-12-17 Thread hugo
>One advantage we've had so far is that django has no dependencies, so >its easy to get up and running. Is there a sane way that we could >include louie with django (a snapshot in the svn?), but not in eggs, so >that the egg version will do the setuptools-ly correct thing and >download/require it?

Re: Magic removal stuff...

2005-12-17 Thread Robert Wittams
> http://louie.berlios.de/ Argh, this is getting ridiculous. I noticed louie requires python 2.4. Django is currently supporting 2.3 upwards. How hard would it be to support 2.3? Robert

Re: Magic removal stuff...

2005-12-17 Thread Robert Wittams
Patrick K. O'Brien wrote: > http://louie.berlios.de/ > The other cool thing is, we can pretend its about Louie Armstrong to fit in with Django and Ellington ;-) Also, an issue I had using pydispatcher was that robustapply.function does not work with classmethods, I had to wrap them in a lambda

Re: Magic removal stuff...

2005-12-17 Thread Robert Wittams
Patrick K. O'Brien wrote: > Robert Wittams wrote: > >>=== Events === >> >>I discussed this with Adrian on IRC a few times, and we agreed that >>events would be a good way to handle quite a number of the issues we >>face - particularly loose coupling. >> >>I've looked around, and it seems like the

Re: Magic removal stuff...

2005-12-17 Thread Jacob Kaplan-Moss
On Dec 17, 2005, at 6:09 AM, Robert Wittams wrote: I really don't like this. It is *not extensible* from the outside. The point about just having things in your class that are able to add to it is that it just works like this anyway (it would be harder to forbid it). The TagCollection etc can

Re: Magic removal stuff...

2005-12-17 Thread Nebojša Đorđević - nesh
On 2005-12-17, at 3:09 CET, Robert Wittams wrote: === Events === At first this will be used to get rid of all field specific stuff remaining in the Model base class and in manipulators - mainly FileField deleting bits (#639) and stuff like that. +1 from me!! And an another +1e100 for all

Re: Magic removal stuff...

2005-12-17 Thread Patrick K. O'Brien
Robert Wittams wrote: > > === Events === > > I discussed this with Adrian on IRC a few times, and we agreed that > events would be a good way to handle quite a number of the issues we > face - particularly loose coupling. > > I've looked around, and it seems like the smart choice for events is > p

Re: Magic removal stuff...

2005-12-17 Thread hugo
>The really funny thing about this: All of the examples I gave are at >least as field-like as the existing ManyToMany field. Yep, that's why I started out with the BEHAVIOUR idea in my comment on this and dropped it - in the end, most stuff you will do to a model class will either be some kind of

Re: Magic removal stuff...

2005-12-17 Thread Robert Wittams
Jacob Kaplan-Moss wrote: > This rubs me the wrong way a bit. I talked to Adrian about this this > afternoon in reference to how Managers are created -- another awesome > improvement, BTW -- and I think my basic problem is the (potential) > confusion between fields and "behavior" elements. Yes

Re: Magic removal stuff...

2005-12-17 Thread hugo
Hi, >1. The class is created. >2. Any class META stuff is taken care of. This may be merged into the >next step. >3. Any remaining attributes of the class are added to the class under >their own control. If they have a method of the signature: > >contribute_to_class(self, cls, name) Hmm. I like

Re: Magic removal stuff...

2005-12-17 Thread Ian Holsman
are you planning on firing events on things like object saves and object retrievals? it might be interesting to use the event system to do auditing, or for in-the back ground updates (like updating the number of people who have viewed a forum) regards ian On 12/17/05, Eugene Lazutkin <[EMAIL PRO

Re: Magic removal stuff...

2005-12-16 Thread Eugene Lazutkin
"Robert Wittams" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > === Events === > > I discussed this with Adrian on IRC a few times, and we agreed that > events would be a good way to handle quite a number of the issues we > face - particularly loose coupling. > > I've looked arou

Re: Magic removal stuff...

2005-12-16 Thread Jacob Kaplan-Moss
Hey Robert -- Thanks for your work on this -- I've just had a chance to check out the branch for the first time, and it's just amazingly awesome. On Dec 16, 2005, at 8:09 PM, Robert Wittams wrote: Ok, so in the magic-removal branch, I've refactored things in a way which makes it very easy t

Re: Magic removal stuff...

2005-12-16 Thread Brant Harris
On 12/16/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > > There are quite a number of other areas this can be applied to as well. > Middleware?

Magic removal stuff...

2005-12-16 Thread Robert Wittams
=== Funky stuff === Ok, so in the magic-removal branch, I've refactored things in a way which makes it very easy to extend the meta system as a third-party. When a class such as this: class Something(Model): name = CharField(maxlength=100) is created, the following happens in the metaclass