From 997c2eac50f925dbf27ddc1dcb665e271bc77cb1 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 26 Oct 2020 14:29:11 +0100 Subject: [PATCH] Use _meta field instead of class --- media/management/commands/export_markdown_site.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/management/commands/export_markdown_site.py b/media/management/commands/export_markdown_site.py index 222149e..a3999c3 100644 --- a/media/management/commands/export_markdown_site.py +++ b/media/management/commands/export_markdown_site.py @@ -19,7 +19,7 @@ class Command(BaseCommand): for model_class, file_name in [(BD, "bd.md"), (Manga, "mangas.md"), (Roman, "romans.md"), (CD, "cd.md"), (Vinyle, "vinyle.md")]: with open(directory + "/docs/" + file_name, "w") as f: - f.write("# " + model_class.Meta.verbose_name) + f.write("# " + model_class._meta.verbose_name) titles = list(set(obj["title"] for obj in model_class.objects.values("title").distinct().all())) titles.sort()