ircbot: don't require topic/setter in IrcChannel
one may want to set autojoin for a channel that hasn't yet had topic stuff logged, so don't require it in the form
This commit is contained in:
parent
ed5f164092
commit
e647fc9b4d
|
@ -0,0 +1,24 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('ircbot', '0007_auto_20150519_2156'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='ircchannel',
|
||||||
|
name='topic_by',
|
||||||
|
field=models.CharField(default=b'', max_length=200, blank=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='ircchannel',
|
||||||
|
name='topic_msg',
|
||||||
|
field=models.TextField(default=b'', blank=True),
|
||||||
|
),
|
||||||
|
]
|
|
@ -52,9 +52,9 @@ class IrcChannel(models.Model):
|
||||||
name = models.CharField(max_length=200, unique=True)
|
name = models.CharField(max_length=200, unique=True)
|
||||||
autojoin = models.BooleanField(default=False)
|
autojoin = models.BooleanField(default=False)
|
||||||
|
|
||||||
topic_msg = models.TextField(default='')
|
topic_msg = models.TextField(default='', blank=True)
|
||||||
topic_time = models.DateTimeField(default=timezone.now)
|
topic_time = models.DateTimeField(default=timezone.now)
|
||||||
topic_by = models.CharField(max_length=200, default='')
|
topic_by = models.CharField(max_length=200, default='', blank=True)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
"""String representation."""
|
"""String representation."""
|
||||||
|
|
Loading…
Reference in New Issue