2019-08-13 13:05:12 +00:00
|
|
|
from django.db import models
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2019-08-13 13:05:12 +00:00
|
|
|
class Preferences(models.Model):
|
2019-08-14 17:39:19 +00:00
|
|
|
""" Definition of the ticket's settings"""
|
2019-08-13 13:05:12 +00:00
|
|
|
|
|
|
|
publish_address = models.EmailField(
|
2019-11-04 16:55:03 +00:00
|
|
|
help_text=_(
|
2019-11-20 00:49:36 +00:00
|
|
|
"Email address to publish the new tickets (leave empty for no publication)."
|
2019-11-04 16:55:03 +00:00
|
|
|
),
|
|
|
|
max_length=1000,
|
|
|
|
null=True,
|
|
|
|
)
|
2019-08-19 08:37:07 +00:00
|
|
|
LANG_FR = 0
|
|
|
|
LANG_EN = 1
|
2019-11-20 00:49:36 +00:00
|
|
|
LANGUES = ((0, _("French")), (1, _("English")))
|
2019-11-04 16:55:03 +00:00
|
|
|
mail_language = models.IntegerField(choices=LANGUES, default=LANG_FR)
|
|
|
|
|
2019-08-13 13:05:12 +00:00
|
|
|
class Meta:
|
2019-11-20 00:49:36 +00:00
|
|
|
verbose_name = _("tickets preferences")
|