Commit c4a2666e authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'refactor-announcements-datetime' into 'master'

Bound announcements on datetime instead of date

See merge request !438
parents 6ab4a53e f30f91b4
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-02 11:39
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('announcements', '0001_initial'),
operations = [
field=models.DateTimeField(, help_text='Hide this announcement before this time.', verbose_name='Display since'),
field=models.DateTimeField(blank=True, help_text='Hide this announcement after this time.', null=True, verbose_name='Display until'),
......@@ -14,13 +14,13 @@ class Announcement(models.Model, metaclass=ModelTranslateMeta):
since = models.DateField(
since = models.DateTimeField(
verbose_name=_('Display since'),
help_text=_("Hide this announcement before this time."),,
until = models.DateField(
until = models.DateTimeField(
verbose_name=_('Display until'),
help_text=_("Hide this announcement after this time."),
......@@ -47,5 +47,5 @@ class Announcement(models.Model, metaclass=ModelTranslateMeta):
def is_visible(self):
"""Is this announcement currently visible"""
return ((self.until is None or self.until > and
(self.since is None or self.since <=
return ((self.until is None or self.until > and
(self.since is None or self.since <=
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment