That's a pretty slick implementation, I'd like to try it out... some questions:

Is it in a usable format?
Are there any directions for pulling this branch down to my local environment?
What happens if the main branch gets updated?


thanks...
ian



On 10/13/05, Robert Wittams <[EMAIL PROTECTED]> wrote:
>
> Ian Maurer wrote:
> > Is there a way to create a manipulator that will span a foreign key
> > relationship, similar to the "edit_inline" feature in the Admin tool?
> >
> > I know I cannot leverage the edit_inline feature now (ticket #535 may
> > fix that) but is there a "smart" way of leveraging the validation and
> > form processing features of Django across multiple objects until this
> > ticket is finished?
> >
> > thanks...
> > ian
> >
> >
>
> As you say, this is possible in the new admin branch, utilising the
> 'follow' argument to a manipulator. This can also be used to restrict
> which fields are instantiated and can be filled by post data (this fixes
> another ticket, I forget the number).
>
> eg , in a simplistic model about States and Cities,
>
> follow = {
>    'description': False, # suppress the description field
>    'cities' : True  # follow the foreign key relationship 'cities'
> }
>
> manipulator = states.ChangeManipulator(5, follow=follow)
>
> if you wanted to suppress a field within cities, you can do it with a
> nested version of the follow argument:
>
> follow = {
>    'description': False,
>    'cities': {
>         'population' : False
>    }
> }
>
> There isn't really a good way to do this without the changes in
> new-admin. You could make your own manipulator, but then you are on your
> own with loading and saving all the fields. This was one of the main
> points of the new-admin branch. An unanswered (post 1.0) question here
> is what to do when an object has a very large number of children.
> Currently we just load them all, which is probably suboptimal.
>
> I'll start writing some docs for the changes in new-admin so more people
> can test them out.
>
> Rob
>
>

Reply via email to