Hi,
I am building a simple web app that allows me to create a custom web
page of different quicktimes for presentation to clients and the like.
I have it working fine , however i'd like to add control over the
ordering of the quicktimes on the display pages. I am having a tough
time understanding how to implement ordering for a Many-to-Many
relationship, as each quicktime is used in multiple reels and would
require having a different value for its order. I would eventually
like to integrate this into the admin interface so i can quickly
define a specific order for a given reel.
Here is a striped down version of my models:
class Quicktime(models.Model):
name = models.CharField(max_length = 100)
order = models.IntegerField(blank = True, null = True)
def __unicode__(self):
return self.name
class Meta:
ordering = ('order',)
class Reel(models.Model):
name = models.CharField(max_length = 100)
quicktimes = models.ManyToManyField(Quicktime)
def __unicode__(self):
return self.name
thanks
Seth Pomerantz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---