From 2a8e7ee766444511eda57d64b9fa7a03d4f1255b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Wed, 11 Dec 2019 13:05:25 +0200 Subject: [PATCH] Django 3.0 --- .travis.yml | 1 - CHANGELOG.md | 1 + README.md | 2 +- hc/accounts/tests/test_project.py | 4 ++-- hc/settings.py | 9 +++++---- requirements.txt | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index c66e0536..a3be1ade 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ dist: xenial language: python python: - - "3.5" - "3.6" - "3.7" - "3.8" diff --git a/CHANGELOG.md b/CHANGELOG.md index e5ec6950..061a4c77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. - "Filtering Rules" dialog, an option to require HTTP POST (#297) - Show Healthchecks version in Django admin header (#306) - Added JSON endpoint for Shields.io (#304) +- Django 3.0 ### Bug Fixes - Don't set CSRF cookie on first visit. Signup is exempt from CSRF protection diff --git a/README.md b/README.md index dba3d723..9861e443 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ It is live here: [http://healthchecks.io/](http://healthchecks.io/) The building blocks are: * Python 3 -* Django 2 +* Django 3 * PostgreSQL or MySQL ## Setting Up for Development diff --git a/hc/accounts/tests/test_project.py b/hc/accounts/tests/test_project.py index 7bc1e3e4..56cd045d 100644 --- a/hc/accounts/tests/test_project.py +++ b/hc/accounts/tests/test_project.py @@ -84,9 +84,9 @@ class ProjectTestCase(BaseTestCase): # And an email should have been sent subj = ( "You have been invited to join" - " Alice's Project on %s" % settings.SITE_NAME + " Alice's Project on %s" % settings.SITE_NAME ) - self.assertEqual(mail.outbox[0].subject, subj) + self.assertHTMLEqual(mail.outbox[0].subject, subj) @override_settings(SECRET_KEY="test-secret") def test_it_rate_limits_invites(self): diff --git a/hc/settings.py b/hc/settings.py index c485891b..352a2d61 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -35,10 +35,11 @@ SUPPORT_EMAIL = os.getenv("SUPPORT_EMAIL") USE_PAYMENTS = envbool("USE_PAYMENTS", "False") REGISTRATION_OPEN = envbool("REGISTRATION_OPEN", "True") VERSION = "" -for line in open(os.path.join(BASE_DIR, "CHANGELOG.md")).readlines(): - if line.startswith("## v"): - VERSION = line.split()[1] - break +with open(os.path.join(BASE_DIR, "CHANGELOG.md")) as f: + for line in f.readlines(): + if line.startswith("## v"): + VERSION = line.split()[1] + break INSTALLED_APPS = ( diff --git a/requirements.txt b/requirements.txt index e273c20b..4fc0d016 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ croniter==0.3.30 -Django==2.2.8 +Django==3.0 django_compressor==2.3 psycopg2==2.8.3 pytz==2019.1