2006/1/11, Joseph Kocherhans <[EMAIL PROTECTED]>:
> 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.
>
I kinda like it.

--
Brice Carpentier aka Br|ce

Reply via email to