mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Spécification du template de langue [oublie]
This commit is contained in:
parent
241c438f05
commit
675660b5f7
1 changed files with 9 additions and 2 deletions
|
@ -52,10 +52,17 @@ class Ticket(AclMixin, models.Model):
|
|||
def publish_mail(self):
|
||||
site_url = GeneralOption.objects.first().main_site_url
|
||||
to_addr = Preferences.objects.first().publish_address
|
||||
template = loader.get_template('tickets/publication_mail')
|
||||
context = Context({'ticket':self,'site_url':site_url})
|
||||
|
||||
lang = Preferences.objects.first().mail_language
|
||||
if(lang == 0):
|
||||
obj = 'Nouvelle ouverture de ticket'
|
||||
template = loader.get_template('tickets/publication_mail_fr')
|
||||
else:
|
||||
obj = 'New ticket opened'
|
||||
template = loader.get_template('tickets/publication_mail_en')
|
||||
send_mail(
|
||||
'Nouvelle ouverture de ticket',
|
||||
obj,
|
||||
template.render(context),
|
||||
GeneralOption.get_cached_value('email_from'),
|
||||
[to_addr],
|
||||
|
|
Loading…
Reference in a new issue