diff options
author | Giancarlo Razzolini <grazzolini@archlinux.org> | 2017-03-20 16:40:00 -0300 |
---|---|---|
committer | Giancarlo Razzolini <grazzolini@archlinux.org> | 2017-03-20 16:40:00 -0300 |
commit | 198f35c3b9c2201fb5f6906e1af8c5d700669d11 (patch) | |
tree | dbac09efa84f23562276e709164baf60e16d4d6b /news | |
parent | e81d36ab05801590343e373fbb97265d84c2fcc5 (diff) | |
download | archweb-198f35c3b9c2201fb5f6906e1af8c5d700669d11.tar.gz archweb-198f35c3b9c2201fb5f6906e1af8c5d700669d11.zip |
news: Add send_announce to the model
Added a new send_announce boolean that controls if an e-mail containing
the announce will or not be sent.
Diffstat (limited to 'news')
-rw-r--r-- | news/migrations/0002_news_send_announce.py | 20 | ||||
-rw-r--r-- | news/models.py | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/news/migrations/0002_news_send_announce.py b/news/migrations/0002_news_send_announce.py new file mode 100644 index 00000000..62c23226 --- /dev/null +++ b/news/migrations/0002_news_send_announce.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('news', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='news', + name='send_announce', + field=models.BooleanField(default=True), + preserve_default=True, + ), + ] diff --git a/news/models.py b/news/models.py index a66da8d4..b413d17b 100644 --- a/news/models.py +++ b/news/models.py @@ -17,6 +17,7 @@ class News(models.Model): guid = models.CharField(max_length=255, editable=False) content = models.TextField() safe_mode = models.BooleanField(default=True) + send_announce = models.BooleanField(default=True) def get_absolute_url(self): return '/news/%s/' % self.slug |