Changed ordering of timestamps.
This commit is contained in:
parent
98e3242253
commit
a1b573cecd
18
src/gameservers/migrations/0004_auto_20150218_1915.py
Normal file
18
src/gameservers/migrations/0004_auto_20150218_1915.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('gameservers', '0003_auto_20150218_1652'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='population',
|
||||||
|
options={'ordering': ['timestamp', 'server']},
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -17,7 +17,7 @@ class Population(models.Model):
|
|||||||
players = models.PositiveIntegerField()
|
players = models.PositiveIntegerField()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ['-timestamp', 'server']
|
ordering = ['timestamp', 'server']
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '{} {}'.format(self.timestamp, self.server.title)
|
return '{} {}'.format(self.timestamp, self.server.title)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user