On 1/11/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 1/11/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote:
> > Create a ForeignKey field that references
> > django.contrib.auth.models.User or whatever. This field cannot be
> > editable=False, or the manipulator will skip over it when you save the
> > object. Exclude the field from your admin screens using the fields
> > attribute of the new inner Admin class. At this point, the user field
> > is techincally editable, but not displayed. Then, the admin add/change
> > views (controller in your terminology) call a method of the inner
> > Admin class to set the correct user in new_data or something before
> > the manipulator validates and saves it. The details obviously need to
> > be worked out, but I think this is a pretty clean solution. Nothing
> > changes but admin views, and the inner Admin class. No more coupling.
>
> Oooh, I like this. Putting methods in the inner Admin class is very clean.

I'll work this up after the namespace stuff is done. magic-removal has
been a branch for too long ;) If the manipulators and descriptor field
changes haven't been finished, maybe this and my other proposal for
redirects can go on the brach too, but first things first. :)

Joseph

Reply via email to