Some com templates improvments and reordering some models

This commit is contained in:
Skia
2017-03-24 09:19:15 +01:00
parent d2da5716ba
commit 39b32d456c
10 changed files with 94 additions and 6 deletions

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('club', '0006_auto_20161229_0040'),
]
operations = [
migrations.AlterModelOptions(
name='club',
options={'ordering': ['name', 'unix_name']},
),
]

View File

@ -38,6 +38,9 @@ class Club(models.Model):
home = models.OneToOneField(SithFile, related_name='home_of_club', verbose_name=_("home"), null=True, blank=True,
on_delete=models.SET_NULL)
class Meta:
ordering = ['name', 'unix_name']
def check_loop(self):
"""Raise a validation error when a loop is found within the parent list"""
objs = []