You can go two directions with this. First, you could use a
intermediate model for the many to many join, which would allow you to
specify extra field on the join, in this case the order. Read up on
this here:
http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships

The problem with solution one is that the many to many won't be
editable on that page anymore.

Solution two would be to scrap the manytomany and use inline models
instead. You would make an intermediate model, say FilmmakerItem,
which would foreign key to the model you want to join to, and a
foreign key to the filmmaker, and would have a field for order. This
would be editable in the admin under the same page.

Read about inline here:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects

On Aug 13, 12:52 pm, Wendy <we...@mutantfactory.com> wrote:
> I have a many to many field, with the horizontal available and chosen
> boxes in the admin.  I wanted to see if there's any way that an admin
> can select the order that the chosen objects show up, and have it be
> saved and display that way.  Right now, they're not ordered, but seem
> to show up based on when the object was created.  So I'm choosing
> filmmakers for a film, and the only way I can change the order is to
> destroy the filmmaker objects, then recreate and add them in a
> different order, something that obviously wouldn't work in the real
> world.  Is there any way to save the order in the chosen box in the
> admin?
>
> Thanks,
> Wendy

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to