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

Index Proposal.datetime

It's used to sort Votes, takes votes list of 10 items in the API from 5s
to 300ms.
parent 87c60f6d
Branches
Étiquettes
1 requête de fusion!22Index Proposal.datetime
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('representatives_votes', '0009_dossier_ext_link'),
]
operations = [
migrations.AlterField(
model_name='proposal',
name='datetime',
field=models.DateTimeField(db_index=True),
),
]
......@@ -27,7 +27,7 @@ class Proposal(HashableModel, TimeStampedModel):
title = models.CharField(max_length=1000, unique=True)
description = models.TextField(blank=True, default='')
reference = models.CharField(max_length=200, blank=True, null=True)
datetime = models.DateTimeField()
datetime = models.DateTimeField(db_index=True)
kind = models.CharField(max_length=200, blank=True, default='')
total_abstain = models.IntegerField()
total_against = models.IntegerField()
......
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