diff --git a/notification/models.py b/notification/models.py index a0185da7..75d88572 100644 --- a/notification/models.py +++ b/notification/models.py @@ -88,7 +88,7 @@ class NoticeSetting(models.Model): user = models.ForeignKey(AUTH_USER_MODEL, verbose_name=_("user")) notice_type = models.ForeignKey(NoticeType, verbose_name=_("notice type")) medium = models.CharField(_("medium"), max_length=1, choices=NOTICE_MEDIA) - send = models.BooleanField(_("send")) + send = models.BooleanField(_("send"), default=False) class Meta: verbose_name = _("notice setting") diff --git a/runtests.py b/runtests.py index e8618f1a..b0944913 100644 --- a/runtests.py +++ b/runtests.py @@ -8,6 +8,14 @@ DEFAULT_SETTINGS = dict( + MIDDLEWARE_CLASSES=( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + ), INSTALLED_APPS=[ "django.contrib.auth", "django.contrib.contenttypes", diff --git a/tox.ini b/tox.ini index 315a27d6..aab2a794 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27-django14,py27-django15,py27-django16 +envlist = py27-django14,py27-django15,py27-django16,py27-django17 [testenv] downloadcache = {toxworkdir}/cache/ @@ -24,3 +24,9 @@ basepython = python2.7 deps = Django==1.6.5 {[testenv]deps} + +[testenv:py27-django17] +basepython = python2.7 +deps = + https://github.com/django/django/archive/1.7c3.zip + {[testenv]deps}