# Generated by Django 2.2.13 on 2020-10-29 22:34 from django.db import migrations def forwards_func(apps, schema_editor): EmailTemplate = apps.get_model("helpdesk", "EmailTemplate") db_alias = schema_editor.connection.alias EmailTemplate.objects.using(db_alias).create( template_name='merged', subject='(Merged)', heading='Ticket merged', plain_text="""Hello, This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ("{{ ticket.title }}") by {{ ticket.submitter_email }} has been merged to ticket {{ ticket.merged_to.ticket }}. From now on, please answer on this ticket, or you can include the tag {{ ticket.merged_to.ticket }} in your e-mail subject.""", html="""

Hello,

This is a courtesy e-mail to let you know that ticket {{ ticket.ticket }} ({{ ticket.title }}) by {{ ticket.submitter_email }} has been merged to ticket {{ ticket.merged_to.ticket }}.

From now on, please answer on this ticket, or you can include the tag {{ ticket.merged_to.ticket }} in your e-mail subject.

""", locale='en' ) EmailTemplate.objects.using(db_alias).create( template_name='merged', subject='(Fusionné)', heading='Ticket Fusionné', plain_text="""Bonjour, Ce courriel indicatif permet de vous prévenir que le ticket {{ ticket.ticket }} ("{{ ticket.title }}") par {{ ticket.submitter_email }} a été fusionné au ticket {{ ticket.merged_to.ticket }}. Veillez à répondre sur ce ticket dorénavant, ou bien inclure la balise {{ ticket.merged_to.ticket }} dans le sujet de votre réponse par mail.""", html="""

Bonjour,

Ce courriel indicatif permet de vous prévenir que le ticket {{ ticket.ticket }} ({{ ticket.title }}) par {{ ticket.submitter_email }} a été fusionné au ticket {{ ticket.merged_to.ticket }}.

Veillez à répondre sur ce ticket dorénavant, ou bien inclure la balise {{ ticket.merged_to.ticket }} dans le sujet de votre réponse par mail.

""", locale='fr' ) def reverse_func(apps, schema_editor): EmailTemplate = apps.get_model("helpdesk", "EmailTemplate") db_alias = schema_editor.connection.alias EmailTemplate.objects.using(db_alias).filter(template_name='merged').delete() class Migration(migrations.Migration): dependencies = [ ('helpdesk', '0033_ticket_merged_to'), ] operations = [ migrations.RunPython(forwards_func, reverse_func), ]