Skip to content

Commit

Permalink
Add Django 2.0 support (Fix #23). Drop support for Django 1.8. Bump t…
Browse files Browse the repository at this point in the history
…o 0.4.0
  • Loading branch information
ruscoder committed Jan 20, 2018
1 parent c6082c9 commit acc9358
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.4.0
* Add Django 2.0 support #23
* Drop support for Django 1.8

## 0.3.3
* Fix multipart form data (@ron8mcr)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Requirements
============

- Python (2.7, 3.5, 3.6)
- Django (1.8, 1.9, 1.10, 1.11)
- Django (1.9, 1.10, 1.11, 2.0)
- djangorestframework (3.5+)

Installation
Expand Down
2 changes: 1 addition & 1 deletion drf_writable_nested/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'DRF writable nested'
__version__ = '0.3.3'
__version__ = '0.4.0'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
Expand Down
3 changes: 1 addition & 2 deletions drf_writable_nested/mixins.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
import uuid
from collections import OrderedDict, defaultdict

from django.contrib.contenttypes.fields import GenericRelation
Expand Down Expand Up @@ -264,7 +263,7 @@ def delete_reverse_relations_if_need(self, instance, reverse_relations):
if related_field.many_to_many and \
not isinstance(related_field, ForeignObjectRel):
related_field_lookup = {
related_field.rel.name: instance,
related_field.remote_field.name: instance,
}
elif isinstance(related_field, GenericRelation):
related_field_lookup = \
Expand Down
10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@ addopts=--tb=short

[tox]
envlist =
{py27,py35}-dj{18,19}-drf{35,36}
{py27,py35,py36}-dj{110,111}-drf{35,36,37}
py{27,35}-dj{19}-drf{35,36}
py{27,35,36}-dj{110,111}-drf{35,36,37}
py{36}-dj{20}-drf{37}

[travis:env]
DJANGO =
1.8: dj18
1.9: dj19
1.10: dj110
1.11: dj111
2.0: dj20

[testenv]
commands = ./py.test --cov drf_writable_nested
setenv =
PYTHONDONTWRITEBYTECODE=1
PYTHONWARNINGS=once
deps =
dj18: Django>=1.8,<1.9
dj19: Django>=1.9,<1.10
dj110: Django>=1.10,<1.11
dj111: Django>=1.11a1,<2.0
dj20: Django>=2.0,<2.1
drf35: djangorestframework>=3.5,<3.6
drf36: djangorestframework>=3.6.0,<3.7
drf37: djangorestframework>=3.7.0,<3.8
Expand Down

0 comments on commit acc9358

Please sign in to comment.