From 05d5898fa99fe0674bd4f1cda70259b904fb09f7 Mon Sep 17 00:00:00 2001 From: Nate Smith Date: Fri, 19 Jul 2019 20:52:01 -0500 Subject: [PATCH] add EmailTemplate --- ttadmin/help/migrations/0005_emailtemplate.py | 23 +++++++++++++++++++ ttadmin/help/models.py | 8 +++++++ 2 files changed, 31 insertions(+) create mode 100644 ttadmin/help/migrations/0005_emailtemplate.py diff --git a/ttadmin/help/migrations/0005_emailtemplate.py b/ttadmin/help/migrations/0005_emailtemplate.py new file mode 100644 index 0000000..5bac1c7 --- /dev/null +++ b/ttadmin/help/migrations/0005_emailtemplate.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.2 on 2019-07-20 01:40 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('help', '0004_ticket_submitted'), + ] + + operations = [ + migrations.CreateModel( + name='EmailTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50)), + ('body', models.TextField()), + ], + ), + ] diff --git a/ttadmin/help/models.py b/ttadmin/help/models.py index 70609aa..4c60ecd 100644 --- a/ttadmin/help/models.py +++ b/ttadmin/help/models.py @@ -46,3 +46,11 @@ class Note(Model): def __str__(self): return "admin note" + + +class EmailTemplate(Model): + name = CharField(blank=False, null=False, max_length=50) + body = TextField(blank=False, null=False) + + def __str__(self): + return f"'{self.name}' email template"