From f066cf10925353c75d13e7c744e33e4390de6f15 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sat, 31 Dec 2022 09:49:20 +0100 Subject: [PATCH] Update to use lazy translations - Close #1 --- nummi/main/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nummi/main/models.py b/nummi/main/models.py index 224cf58..ad1021d 100644 --- a/nummi/main/models.py +++ b/nummi/main/models.py @@ -6,7 +6,7 @@ from django.conf import settings from django.core.validators import FileExtensionValidator, validate_slug from django.db import models, transaction from django.urls import reverse -from django.utils.translation import gettext as _ +from django.utils.translation import gettext_lazy as _ class UserModel(models.Model): @@ -41,7 +41,7 @@ class Account(CustomModel): ) def __str__(self): - return self.name + return str(self.name) def get_absolute_url(self): return reverse("account", kwargs={"pk": self.pk}) @@ -88,7 +88,7 @@ class Category(CustomModel): budget = models.BooleanField(default=True, verbose_name=_("Budget")) def __str__(self): - return self.name + return str(self.name) def get_absolute_url(self): return reverse("category", kwargs={"pk": self.pk})