layerindex-web/rrs/migrations/0006_maintplan_email.py
Paul Eggleton 735353ebd1 rrs/models: add fields for more flexible email handling
* Add a flag to say whether emails should be sent
* Add fields for from/to/subject (to replace what's currently in
  settings)
* Add user link for administrator to replace the hardcoded values in the
  email template

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00

42 lines
1.6 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('rrs', '0005_release_plan_nonnull'),
]
operations = [
migrations.AddField(
model_name='maintenanceplan',
name='admin',
field=models.ForeignKey(blank=True, null=True, help_text='Plan administrator', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='maintenanceplan',
name='email_enabled',
field=models.BooleanField(verbose_name='Enable emails', default=False, help_text='Enable automatically sending report emails for this plan'),
),
migrations.AddField(
model_name='maintenanceplan',
name='email_from',
field=models.CharField(max_length=255, blank=True, help_text='Sender for automated emails'),
),
migrations.AddField(
model_name='maintenanceplan',
name='email_subject',
field=models.CharField(max_length=255, blank=True, default='[Recipe reporting system] Upgradable recipe name list', help_text='Subject line of automated emails'),
),
migrations.AddField(
model_name='maintenanceplan',
name='email_to',
field=models.CharField(max_length=255, blank=True, help_text='Recipient for automated emails (separate multiple addresses with ;)'),
),
]