Skip to content
Extraits de code Groupes Projets
Valider aaa50edc rédigé par Jamesie Pic's avatar Jamesie Pic
Parcourir les fichiers

Index Group kind and abbreviation

We're matching on them for group list and detail pages ...
parent 113b93f6
Branches
Étiquettes
Aucune requête de fusion associée trouvée
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('representatives', '0009_order_mandates_by_end_date_descendant'),
]
operations = [
migrations.AlterModelOptions(
name='mandate',
options={'ordering': ('-end_date',)},
),
migrations.AlterField(
model_name='group',
name='abbreviation',
field=models.CharField(default=b'', max_length=10, db_index=True, blank=True),
),
migrations.AlterField(
model_name='group',
name='kind',
field=models.CharField(max_length=255, db_index=True),
),
]
......@@ -158,8 +158,9 @@ class Group(HashableModel, TimeStampedModel):
An entity represented by a representative through a mandate
"""
name = models.CharField(max_length=255)
abbreviation = models.CharField(max_length=10, blank=True, default='')
kind = models.CharField(max_length=255, blank=True, default='')
abbreviation = models.CharField(max_length=10, blank=True, default='',
db_index=True)
kind = models.CharField(max_length=255, db_index=True)
hashable_fields = ['name', 'abbreviation', 'kind']
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter