Verified Commit f67c4aa4 authored by Jonathan Weth's avatar Jonathan Weth

Add i18n for verbose_name's in

parent 6f23b034
......@@ -2,17 +2,18 @@ from django.db import models
# Create your models here.
from aleksis.core.util.helper import path_and_rename
from django.utils.translation import gettext_lazy as _
class Menu(models.Model):
calendar_week = models.IntegerField(verbose_name="KW")
year = models.IntegerField(verbose_name="Jahr")
pdf = models.FileField(upload_to=path_and_rename, verbose_name="PDF")
calendar_week = models.IntegerField(verbose_name=_("CW"))
year = models.IntegerField(verbose_name=_("Year"))
pdf = models.FileField(upload_to=path_and_rename, verbose_name=_("PDF"))
class Meta:
unique_together = ("calendar_week", "year")
verbose_name = "Speiseplan"
verbose_name_plural = "Speisepläne"
verbose_name = _("Menu")
verbose_name_plural = _("Menus")
def __str__(self):
return "KW {}/{}".format(self.calendar_week, self.year)
return "{} {}/{}".format(_("CW"), self.calendar_week, self.year)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment