-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emails : nouveau modèle TemplateTransactional pour stocker nos config…
…urations (#1018) * New conversations.TemplateTransactional model * Add to admin * Add source, is_active & code fields * New property get_template_id
- Loading branch information
Showing
5 changed files
with
146 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
ATTRIBUTES_TO_SAVE_FOR_INBOUND = ["From", "To", "CC", "ReplyTo", "SentAtDate", "Attachments"] | ||
|
||
SOURCE_MAILJET = "MAILJET" | ||
SOURCE_BREVO = "BREVO" | ||
|
||
SOURCE_CHOICES = ( | ||
(SOURCE_MAILJET, "Mailjet"), | ||
(SOURCE_BREVO, "Brevo"), | ||
) |
66 changes: 66 additions & 0 deletions
66
lemarche/conversations/migrations/0012_templatetransactional.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Generated by Django 4.2.2 on 2023-12-14 09:41 | ||
|
||
import django.utils.timezone | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("conversations", "0011_conversation_sender_siae_encoded_unique"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="TemplateTransactional", | ||
fields=[ | ||
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("name", models.CharField(max_length=255, verbose_name="Nom")), | ||
( | ||
"code", | ||
models.CharField( | ||
blank=True, db_index=True, max_length=255, null=True, unique=True, verbose_name="Nom technique" | ||
), | ||
), | ||
("description", models.TextField(blank=True, verbose_name="Description")), | ||
( | ||
"mailjet_id", | ||
models.IntegerField( | ||
blank=True, | ||
db_index=True, | ||
null=True, | ||
unique=True, | ||
verbose_name="Identifiant Mailjet", | ||
), | ||
), | ||
( | ||
"brevo_id", | ||
models.IntegerField( | ||
blank=True, | ||
db_index=True, | ||
null=True, | ||
unique=True, | ||
verbose_name="Identifiant Brevo", | ||
), | ||
), | ||
("is_active", models.BooleanField(default=False, verbose_name="Actif")), | ||
( | ||
"source", | ||
models.CharField( | ||
blank=True, | ||
choices=[("MAILJET", "Mailjet"), ("BREVO", "Brevo")], | ||
max_length=20, | ||
verbose_name="Source", | ||
), | ||
), | ||
( | ||
"created_at", | ||
models.DateTimeField(default=django.utils.timezone.now, verbose_name="Date de création"), | ||
), | ||
("updated_at", models.DateTimeField(auto_now=True, verbose_name="Date de modification")), | ||
], | ||
options={ | ||
"verbose_name": "Template transactionnel", | ||
"verbose_name_plural": "Templates transactionnels", | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters