linting
This commit is contained in:
parent
bc7430cb5d
commit
5062a1e84e
7 changed files with 42 additions and 25 deletions
|
@ -1,10 +1,13 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from .models import Category, PartitionSet, SetList, Partition
|
||||
from .models import Category, Partition, PartitionSet, SetList
|
||||
|
||||
|
||||
class PartitionAdmin(admin.ModelAdmin):
|
||||
list_filter = ( 'morceau', )
|
||||
list_filter = ("morceau",)
|
||||
|
||||
|
||||
admin.site.register(Category)
|
||||
admin.site.register(PartitionSet)
|
||||
admin.site.register(SetList)
|
||||
admin.site.register(Partition,PartitionAdmin)
|
||||
admin.site.register(Partition, PartitionAdmin)
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
# Generated by Django 2.2.24 on 2022-01-18 14:25
|
||||
|
||||
from django.db import migrations
|
||||
import django.db.models.functions.text
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('partitions', '0005_setlist'),
|
||||
("partitions", "0005_setlist"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='partition',
|
||||
options={'ordering': (django.db.models.functions.text.Lower('nom'),), 'verbose_name': 'Partition', 'verbose_name_plural': 'Partitions'},
|
||||
name="partition",
|
||||
options={
|
||||
"ordering": (django.db.models.functions.text.Lower("nom"),),
|
||||
"verbose_name": "Partition",
|
||||
"verbose_name_plural": "Partitions",
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
# Generated by Django 2.2.24 on 2022-01-18 14:42
|
||||
|
||||
from django.db import migrations
|
||||
import django.db.models.functions.text
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('partitions', '0006_auto_20220118_1525'),
|
||||
("partitions", "0006_auto_20220118_1525"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='partitionset',
|
||||
options={'ordering': ('category', django.db.models.functions.text.Lower('nom')), 'verbose_name': 'Morceau', 'verbose_name_plural': 'Morceaux'},
|
||||
name="partitionset",
|
||||
options={
|
||||
"ordering": ("category", django.db.models.functions.text.Lower("nom")),
|
||||
"verbose_name": "Morceau",
|
||||
"verbose_name_plural": "Morceaux",
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import os
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.db import models
|
||||
from django.db.models.functions import Lower
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.contrib import admin
|
||||
|
||||
|
||||
class Category(models.Model):
|
||||
|
@ -39,7 +39,6 @@ class Partition(models.Model):
|
|||
ordering = (Lower("nom"),)
|
||||
|
||||
|
||||
|
||||
class PartitionSet(models.Model):
|
||||
nom = models.CharField(max_length=100)
|
||||
auteur = models.CharField(max_length=100)
|
||||
|
@ -71,7 +70,10 @@ class PartitionSet(models.Model):
|
|||
class Meta:
|
||||
verbose_name = _("Morceau")
|
||||
verbose_name_plural = _("Morceaux")
|
||||
ordering = ("category",Lower("nom"),)
|
||||
ordering = (
|
||||
"category",
|
||||
Lower("nom"),
|
||||
)
|
||||
|
||||
|
||||
from datetime import date as ddate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue