Update to use lazy translations - Close #1

This commit is contained in:
Edgar P. Burkhart 2022-12-31 09:49:20 +01:00
parent bae4fed8d6
commit f066cf1092
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -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})