From beeba1b541e6eee9c05143e7cbb92b4da792bcf6 Mon Sep 17 00:00:00 2001 From: Graham Ullrich Date: Fri, 23 Feb 2018 18:38:57 -0700 Subject: [PATCH 1/2] Add migration check Specify coverage config file --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index b17b525..fac6da4 100644 --- a/tox.ini +++ b/tox.ini @@ -44,8 +44,9 @@ deps = usedevelop = True commands = - coverage run setup.py test - coverage report -m --skip-covered + python makemigrations.py --check --dry-run + coverage run --rcfile=tox.ini setup.py test + coverage report --rcfile=tox.ini -m --skip-covered [testenv:checkqa] commands = From 63bda6481026f75e7947a835d6e0bb36c77263b1 Mon Sep 17 00:00:00 2001 From: Graham Ullrich Date: Fri, 23 Feb 2018 18:39:30 -0700 Subject: [PATCH 2/2] Fix migration missing on_delete= --- README.md | 4 ++++ pinax/blog/migrations/0010_auto_20161223_1014.py | 7 ++++++- setup.py | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 27db66b..724940a 100644 --- a/README.md +++ b/README.md @@ -392,6 +392,10 @@ Both templates ship already configured to work out of the box. ## Change Log +### 7.0.3 + +* Fix migration missing on_delete= + ### 7.0.2 * Restore and improve documentation guidance for pinax-images usage diff --git a/pinax/blog/migrations/0010_auto_20161223_1014.py b/pinax/blog/migrations/0010_auto_20161223_1014.py index 80fb041..5d6a83e 100644 --- a/pinax/blog/migrations/0010_auto_20161223_1014.py +++ b/pinax/blog/migrations/0010_auto_20161223_1014.py @@ -4,6 +4,7 @@ from django.conf import settings from django.db import migrations, models +import django.db.models.deletion def initial_blogs(apps, schema_editor): @@ -33,7 +34,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='blog', name='scoper', - field=models.OneToOneField(related_name='blog', to=settings.PINAX_BLOG_SCOPING_MODEL) + field=models.OneToOneField( + related_name='blog', + to=settings.PINAX_BLOG_SCOPING_MODEL, + on_delete=django.db.models.deletion.CASCADE, + ) ) ) operations.append( diff --git a/setup.py b/setup.py index 8943a6c..55ab966 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = "7.0.2" +VERSION = "7.0.3" LONG_DESCRIPTION = """ .. image:: http://pinaxproject.com/pinax-design/patches/pinax-blog.svg :target: https://pypi.python.org/pypi/pinax-blog/