class Department(models.Model):
    slug = models.SlugField(verbose_name=_('Slug'), help_text=_(
        'Uri identifier for this department.'), max_length=255)
name = models.CharField(verbose_name=_('Department Name'), help_text=_(
    "The department's name."), max_length=255)
description = models.TextField(verbose_name=_('Description'), help_text=_(
    "Department's description"))
people = models.ManyToManyField(Person, through='DepartmentPeople',
    related_name='people', verbose_name=_('People'), help_text=_(
    'People in this Department'))
order_by = models.IntegerField(verbose_name=_('Ordering Weight'),
    help_text=_("This item's weight within a list."), max_length=255)


class Meta:
    verbose_name = _('Department')
verbose_name_plural = _('Departments')
ordering = ['order_by']

def people_list(self):
    return [dp.person for dp in DepartmentPeople.objects.filter(department=
        self).order_by('order')]

def __unicode__(self):
    return self.name
Определите порядок для ManyToManyField с помощью django