Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Ordering of ManyToManyField using a field of the intermediate table
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alex Rades  
View profile  
 More options Jun 30, 4:34 am
From: Alex Rades <alera...@gmail.com>
Date: Tue, 30 Jun 2009 10:34:19 +0200
Local: Tues, Jun 30 2009 4:34 am
Subject: Ordering of ManyToManyField using a field of the intermediate table
Hi,
I've also asked on the users ml but got no anwser. Maybe you can
undestand the question better?

Hi,
I have a couple of models like:

class Album(models.Model):
   title = models.CharField(max_length=255)

class Image(models.Model):
   image = models.ImageField(upload_to='images/')
   albums = models.ManyToManyField(Album, blank=True)

the schema of the intermediate table is, of course:

 `id` int(11) NOT NULL auto_increment,
 `image_id` int(11) NOT NULL,
 `album_id` int(11) NOT NULL,

Is it possible to order album.image_set with respect to the ID field
of the intermediate table?
I'd like to do this so i can efficiently sort images in the order they
were added to the album.

Thank you!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luke Plant  
View profile  
 More options Jun 30, 5:12 am
From: Luke Plant <L.Plant...@cantab.net>
Date: Tue, 30 Jun 2009 10:12:28 +0100
Local: Tues, Jun 30 2009 5:12 am
Subject: Re: Ordering of ManyToManyField using a field of the intermediate table
On Tuesday 30 June 2009 09:34:19 Alex Rades wrote:

> Hi,
> I've also asked on the users ml but got no anwser. Maybe you can
> undestand the question better?

Please don't do that - the developers' list and the users' list have
distinct purposes, and the fact that you didn't get an answer on the
users' does not make this on-topic for developers'.

Thanks,

Luke

--
When you're great, people often mistake candor for bragging.
 -- Calvin and Hobbes

Luke Plant || http://lukeplant.me.uk/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google