Skip to content

Commit

Permalink
Merge pull request #50 from ambitioninc/develop
Browse files Browse the repository at this point in the history
1.0.0
  • Loading branch information
somewes authored Dec 8, 2017
2 parents 4b79e3c + 3b1715d commit ad5e5e5
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 13 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
sudo: false
language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
env:
global:
- DB=postgres
matrix:
- DJANGO=">=1.9,<1.10"
- DJANGO=">=1.10,<1.11"
- DJANGO=">=1.11,<2.0"
- DJANGO=">=2.0,<2.1"
install:
- pip install -q coverage flake8 Django$DJANGO django-nose>=1.4
before_script:
Expand Down
2 changes: 1 addition & 1 deletion dynamic_initial_data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def handle_deletions(self):
for receipt in RegisteredForDeletionReceipt.objects.exclude(register_time=now):
try:
receipt.model_obj.delete()
except:
except: # noqa
# The model object may no longer be there, its ctype may be invalid, or it might be protected.
# Regardless, the model object cannot be deleted, so go ahead and delete its receipt.
pass
Expand Down
8 changes: 8 additions & 0 deletions dynamic_initial_data/docs/release_notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Release Notes
=============

v1.0.0
------
* Drop Django 1.9 support
* Drop Django 1.10 support
* Add Django 2.0 support
* Drop python 2.7 support
* Drop python 3.4 support

v0.8.0
------
* Add python 3.6 support
Expand Down
3 changes: 2 additions & 1 deletion dynamic_initial_data/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import unicode_literals

from django.db import models, migrations
import django.db.models.deletion


class Migration(migrations.Migration):
Expand All @@ -17,7 +18,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
('model_obj_id', models.PositiveIntegerField()),
('register_time', models.DateTimeField()),
('model_obj_type', models.ForeignKey(to='contenttypes.ContentType')),
('model_obj_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
],
options={
},
Expand Down
2 changes: 1 addition & 1 deletion dynamic_initial_data/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RegisteredForDeletionReceipt(models.Model):
initial data process.
"""
# The model object that was registered
model_obj_type = models.ForeignKey(ContentType)
model_obj_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
model_obj_id = models.PositiveIntegerField()
model_obj = GenericForeignKey('model_obj_type', 'model_obj_id', for_concrete_model=False)

Expand Down
2 changes: 1 addition & 1 deletion dynamic_initial_data/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.8.0'
__version__ = '1.0.0'
7 changes: 6 additions & 1 deletion publish.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import subprocess

subprocess.call(['rm', '-r', 'dist/'])
subprocess.call(['pip', 'install', 'wheel'])
subprocess.call(['pip', 'install', 'twine'])
subprocess.call(['python', 'setup.py', 'clean', '--all'])
subprocess.call(['python', 'setup.py', 'register', 'sdist', 'bdist_wheel', 'upload'])
subprocess.call(['python', 'setup.py', 'register', 'sdist', 'bdist_wheel'])
subprocess.call(['twine', 'upload', 'dist/*'])
subprocess.call(['rm', '-r', 'dist/'])
subprocess.call(['rm', '-r', 'build/'])
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ def get_version():
packages=find_packages(),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Intended Audience :: Developers',
Expand All @@ -40,8 +38,8 @@ def get_version():
],
license='MIT',
install_requires=[
'Django>=1.9',
'django-manager-utils>=0.13.0',
'Django>=1.11',
'django-manager-utils>=1.0.0',
],
tests_require=[
'psycopg2',
Expand Down

0 comments on commit ad5e5e5

Please sign in to comment.