these changes shouldn't have been commited at all. my bad.

This commit is contained in:
jonaswinkler 2020-12-16 21:08:03 +01:00
parent 7f933d373f
commit cf3fa50b55
3 changed files with 32 additions and 4 deletions

View File

@ -69,7 +69,7 @@ class DocumentAdmin(admin.ModelAdmin):
filter_horizontal = ("tags",)
ordering = ["-created", "correspondent"]
ordering = ["-created"]
date_hierarchy = "created"

View File

@ -0,0 +1,29 @@
# Generated by Django 3.1.4 on 2020-12-16 20:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('documents', '1008_auto_20201216_1736'),
]
operations = [
migrations.AlterModelOptions(
name='correspondent',
options={'ordering': ('name',)},
),
migrations.AlterModelOptions(
name='documenttype',
options={'ordering': ('name',)},
),
migrations.AlterModelOptions(
name='savedview',
options={'ordering': ('name',)},
),
migrations.AlterModelOptions(
name='tag',
options={'ordering': ('name',)},
),
]

View File

@ -11,7 +11,6 @@ import dateutil.parser
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.db.models.functions import Lower
from django.utils import timezone
from documents.file_handling import archive_name_from_filename
@ -61,7 +60,7 @@ class MatchingModel(models.Model):
class Meta:
abstract = True
ordering = (Lower("name"),)
ordering = ("name",)
def __str__(self):
return self.name
@ -307,7 +306,7 @@ class SavedView(models.Model):
class Meta:
ordering = (Lower("name"),)
ordering = ("name",)
user = models.ForeignKey(User, on_delete=models.CASCADE)
name = models.CharField(max_length=128)