Update to use lazy translations - Close #1
This commit is contained in:
parent
bae4fed8d6
commit
f066cf1092
1 changed files with 3 additions and 3 deletions
|
@ -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})
|
||||
|
|
Loading…
Reference in a new issue