countdown: fields for sending reminders
extending countdown items in order to have them also store reminders, which are the same idea (an event at a time) but these are watched by the irc bot and sent to the specified destination when the time is reached this adds support for configuring this, code in support of it is coming in later commits bss/dr.botzo#11
This commit is contained in:
parent
0666fe27e0
commit
c81d0519a0
35
countdown/migrations/0003_auto_20170222_2025.py
Normal file
35
countdown/migrations/0003_auto_20170222_2025.py
Normal file
@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-02-23 02:25
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('countdown', '0002_remove_countdownitem_source'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='countdownitem',
|
||||
name='is_reminder',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='countdownitem',
|
||||
name='reminder_message',
|
||||
field=models.TextField(default=''),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='countdownitem',
|
||||
name='reminder_target',
|
||||
field=models.CharField(default='', max_length=64),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='countdownitem',
|
||||
name='sent_reminder',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
@ -16,6 +16,12 @@ class CountdownItem(models.Model):
|
||||
name = models.CharField(max_length=64, default='')
|
||||
at_time = models.DateTimeField()
|
||||
|
||||
is_reminder = models.BooleanField(default=False)
|
||||
sent_reminder = models.BooleanField(default=False)
|
||||
|
||||
reminder_message = models.TextField(default="")
|
||||
reminder_target = models.CharField(max_length=64, default='')
|
||||
|
||||
created_time = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
def __str__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user