Re: magic-removal Q: tagging/auditing functionality -- howto

2006-02-25 Thread ChaosKCW
Hi I have been thinking about doing something like this, and it seems you probably would have to use the new save() method. However you would still need a model for each history table. Although I was toying with a genric history table (more akin to a log) where you could then easly code it up onc

magic-removal Q: tagging/auditing functionality -- howto

2006-02-21 Thread Ian Holsman
hi. So I have my tagging and auditing application on the current trunk, and they service their purpose well. but I'd like to know the 'best' way to rewrite this in the magic-removal trunk. when magic removal was first proposed it mentioned that these kind of things would be much easier. so.. h

Re: magic-removal q

2005-12-20 Thread Adrian Holovaty
On 12/16/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > Now that you mention it, I think "Admin" and "Meta" look better, > though... I've changed "class META" to "class Meta" in the magic-removal branch. The former is no longer accepted. I figure since this will be such a big change, we migh

Re: magic-removal q

2005-12-20 Thread Simon Willison
On 16 Dec 2005, at 21:09, Jacob Kaplan-Moss wrote: Now that you mention it, I think "Admin" and "Meta" look better, though... +1. They're much prettier and improve code readability (a tiny bit) as well.

Re: magic-removal q

2005-12-16 Thread Jacob Kaplan-Moss
On Dec 16, 2005, at 2:01 PM, Robert Wittams wrote: Brant Harris wrote: However, Why do they have to be all caps? "class Admin" and "class Meta", seem nicer. I think so too. It would be easy enough to make it accept both. I always think capitals are constants, or I'm using something scary l

Re: magic-removal q

2005-12-16 Thread Robert Wittams
Brant Harris wrote: > On 12/15/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > >>Basically, promote Admin settings to a full inner class, rather than >>nesting it in meta. It would still end up in meta though. >> >>Thoughts? > > > +1 > > Just last night I was making a new model, and thinking t

Re: magic-removal q

2005-12-16 Thread oggie rob
Robert Wittams wrote: >That would be even wierder in my opinion, as the Manager: >a) is not required >b) is orthogonal to the admin Fair enough. I guess what I was looking for was an ADMIN class that is closer to a manipulator (and if so I think it is inflexible to assume there should only ever b

Re: magic-removal q

2005-12-16 Thread Brant Harris
On 12/15/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > Basically, promote Admin settings to a full inner class, rather than > nesting it in meta. It would still end up in meta though. > > Thoughts? +1 Just last night I was making a new model, and thinking that this should be done. However, Wh

Re: magic-removal q

2005-12-16 Thread Simon Willison
On 16 Dec 2005, at 02:38, Adrian Holovaty wrote: I could go either way on this. But if we create the ADMIN thing, maybe it's a good opportunity to move some of the admin-specific Field options into the ADMIN class instead of in the Field. It's always struck me as a design smell that admin sp

Re: magic-removal q

2005-12-16 Thread Robert Wittams
oggie rob wrote: > Can the admin options be specified in the meta.Manager field? > e.g. > class Whatever(Model): > name = CharField(maxlength=100) > objects = Manager(list_display=) > > -rob > > That would be even wierder in my opinion, as the Manager: a) is not required b)

Re: magic-removal q

2005-12-16 Thread hugo
>Basically, promote Admin settings to a full inner class, rather than >nesting it in meta. It would still end up in meta though. +1 from me on that one. The Admin-Minilanguage within the META-Minilanguage is rather weird currently, one uses attribute=value syntax, the other uses list-of-named-par

Re: magic-removal q

2005-12-15 Thread oggie rob
Can the admin options be specified in the meta.Manager field? e.g. class Whatever(Model): name = CharField(maxlength=100) objects = Manager(list_display=) -rob

Re: magic-removal q

2005-12-15 Thread Tom Tobin
On 12/15/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > > Basically, promote Admin settings to a full inner class, rather than > nesting it in meta. It would still end up in meta though. +1; the improvement in readability would be welcome. The Admin declarations are too visually messy at the mo

Re: magic-removal q

2005-12-15 Thread Adrian Holovaty
On 12/15/05, Robert Wittams <[EMAIL PROTECTED]> wrote: > Basically, promote Admin settings to a full inner class, rather than > nesting it in meta. It would still end up in meta though. I could go either way on this. But if we create the ADMIN thing, maybe it's a good opportunity to move some of

magic-removal q

2005-12-15 Thread Robert Wittams
As we are regularising the model syntax, here is a question, Should class Whatever(meta.Model): name = meta.CharField(maxlength=100) class META: admin = meta.Admin( list_display = ('username', 'email', 'first_name','last_name', 'is_sta