mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Some com templates improvments and reordering some models
This commit is contained in:
18
club/migrations/0007_auto_20170324_0917.py
Normal file
18
club/migrations/0007_auto_20170324_0917.py
Normal 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']},
|
||||
),
|
||||
]
|
@ -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 = []
|
||||
|
Reference in New Issue
Block a user