Projet

Général

Profil

« Précédent | Suivant » 

Révision 1ed52fd7

Ajouté par Frédéric Péters il y a environ 4 ans

misc: add default ordering for categories (#41628)

Voir les différences:

corbo/migrations/0012_auto_20200413_1854.py
1
# -*- coding: utf-8 -*-
2
# Generated by Django 1.11.17 on 2020-04-13 18:54
3
from __future__ import unicode_literals
4

  
5
from django.db import migrations
6

  
7

  
8
class Migration(migrations.Migration):
9

  
10
    dependencies = [
11
        ('corbo', '0011_auto_20180426_1334'),
12
    ]
13

  
14
    operations = [
15
        migrations.AlterModelOptions(
16
            name='category',
17
            options={'ordering': ['name']},
18
        ),
19
    ]
corbo/models.py
31 31
                help_text=_('if defined, announces will be automatically created from rss items'))
32 32
    ctime = models.DateTimeField(auto_now_add=True)
33 33

  
34
    class Meta:
35
        ordering = ['name']
36

  
34 37
    def __unicode__(self):
35 38
        return self.name
36 39

  

Formats disponibles : Unified diff