order track by name
This commit is contained in:
parent
e9d768f1d3
commit
ecf726dabd
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.1 on 2017-10-16 17:13
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cfp', '0013_tags'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='track',
|
||||
options={'ordering': ['name']},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='talk',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(blank=True, to='cfp.Tag'),
|
||||
),
|
||||
]
|
|
@ -144,6 +144,7 @@ class Track(PonyConfModel):
|
|||
|
||||
class Meta:
|
||||
unique_together = ('site', 'name')
|
||||
ordering = ['name']
|
||||
|
||||
def estimated_duration(self):
|
||||
return sum([talk.estimated_duration for talk in self.talk_set.all()])
|
||||
|
|
Loading…
Reference in New Issue