Re: Many to Many Ordered List

2006-06-19 Thread Ivan Manolov

I am having a similar problem here.
having read the m2m_intermediary/  wiki page, I still cant wrap my head
around the idea of displaying a multiple select dropdown list of
related objects on the admin side.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Many to Many Ordered List

2006-06-19 Thread yml

Here it is a link that details the solution a bit more:

   -
http://www.djangoproject.com/documentation/models/m2m_intermediary/

Yann


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Many to Many Ordered List

2006-06-19 Thread yml

I would handle  this kind of situation by adding an intermediate class
AttributeOfTheLink. I don't know if this is a good practice but I think
it will do the tricks.

Let me know if you find something better.

Yann


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Many to Many Ordered List

2006-06-19 Thread [EMAIL PROTECTED]


James Bennett wrote:
> On 6/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > The problem is, how can I preserve the many to many relationship, but
> > have a specific order for the bands?  Any ideas?
>
> You should be able to take the QuerySet of bands for the concert and
> tack on an 'order_by()' to sort by whatever field you like on the band
> model.

That's a good idea, except the bands will be in a different order
depending on the show they're in.  Somedays Stevie Wonder is the
headliner, other days he's just opening for Prince.

Thanks for the idea.  I think this might be a complicated thing to
handle, without an easy answer.

Chris


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Many to Many Ordered List

2006-06-19 Thread [EMAIL PROTECTED]

Hi There,

I just released my first pubic facing Django site, and have run into a
design problem.  It's a music blog / band site at
http://www.victimoftime.com

Something I didn't consider when I was building it (I'm the tech guy,
others are the content people) is that at a given concert, the bands
play in a specific order, and that order is important.

I chose to use Many to Many relationships for concerts and bands, so
that I can easily give a view of a particular concert, with the bands
involved, click on a band, and get a listing of upcoming shows, etc.

The problem is, how can I preserve the many to many relationship, but
have a specific order for the bands?  Any ideas?

If nothing else, I'm probably going to include a field for band order
that's just a string.  Then use some regexes to figure out which band
is which from the list.  

Thanks in advance.

Chris


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---