From be76bf48574c9e8e16fd6267ffd1c211d27dae02 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 26 Sep 2020 11:45:31 +0200 Subject: [PATCH] Add "De" as unwanted title prefix --- media/management/commands/import_no_isbn_roman.py | 1 + 1 file changed, 1 insertion(+) diff --git a/media/management/commands/import_no_isbn_roman.py b/media/management/commands/import_no_isbn_roman.py index 64d5811..3e4c52d 100644 --- a/media/management/commands/import_no_isbn_roman.py +++ b/media/management/commands/import_no_isbn_roman.py @@ -38,6 +38,7 @@ class Command(BaseCommand): if all(not unicodedata.category(char).startswith(cat) for cat in {'M', 'P', 'Z', 'C'}) or char == ' ' ).casefold().upper() + title_normalized = re.sub(r'^DE ', '', title_normalized) title_normalized = re.sub(r'^LE ', '', title_normalized) title_normalized = re.sub(r'^LA ', '', title_normalized) title_normalized = re.sub(r'^LES ', '', title_normalized)