diff --git a/.travis.yml b/.travis.yml index 7efa312..acc919f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,209 +5,64 @@ matrix: - python: '3.6' env: TOXENV=py36-djmaster-dtmaster-tests - python: '3.6' - env: TOXENV=py36-dj2.0-dt1.17-tests + env: TOXENV=py36-djmaster-dt1.21-tests - python: '3.6' - env: TOXENV=py36-dj2.0-dt1.18-tests - - python: '3.6' - env: TOXENV=py36-dj2.0-dt1.19-tests - - python: '3.6' - env: TOXENV=py36-dj2.0-dt1.21-tests + env: TOXENV=py36-djmaster-dt2.0-tests - python: '3.6' env: TOXENV=py36-dj2.0-dtmaster-tests - python: '3.6' - env: TOXENV=py36-dj2.1-dt1.17-tests + env: TOXENV=py36-dj2.1-dtmaster-tests - python: '3.6' - env: TOXENV=py36-dj2.1-dt1.18-tests + env: TOXENV=py36-dj2.0-dt1.21-tests - python: '3.6' - env: TOXENV=py36-dj2.1-dt1.19-tests + env: TOXENV=py36-dj2.0-dt2.0-tests - python: '3.6' env: TOXENV=py36-dj2.1-dt1.21-tests - python: '3.6' - env: TOXENV=py36-dj2.1-dtmaster-tests + env: TOXENV=py36-dj2.1-dt2.0-tests - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.17-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.18-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.19-tests + env: TOXENV=py27-dj1.11-dt1.7-tests - python: '2.7' env: TOXENV=py27-dj1.11-dt1.21-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dtmaster-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.17-tests - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.18-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.19-tests + env: TOXENV=py36-dj1.11-dt1.7-tests - python: '3.6' env: TOXENV=py36-dj1.11-dt1.21-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dtmaster-tests - python: '2.7' env: TOXENV=py27-dj1.9-dt1.5-tests - python: '2.7' env: TOXENV=py27-dj1.9-dt1.6-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.7-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.8-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.9-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.10-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.11-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.12-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.13-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.14-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.15-tests - - python: '2.7' - env: TOXENV=py27-dj1.9-dt1.16-tests - python: '2.7' env: TOXENV=py27-dj1.10-dt1.5-tests - python: '2.7' env: TOXENV=py27-dj1.10-dt1.6-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.7-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.8-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.9-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.10-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.11-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.12-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.13-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.14-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.15-tests - - python: '2.7' - env: TOXENV=py27-dj1.10-dt1.16-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.5-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.6-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.7-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.8-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.9-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.10-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.11-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.12-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.13-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.14-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.15-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dt1.16-tests - python: '3.6' env: TOXENV=py36-dj1.9-dt1.5-tests - python: '3.6' env: TOXENV=py36-dj1.9-dt1.6-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.7-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.8-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.9-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.10-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.11-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.12-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.13-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.14-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.15-tests - - python: '3.6' - env: TOXENV=py36-dj1.9-dt1.16-tests - python: '3.6' env: TOXENV=py36-dj1.10-dt1.5-tests - python: '3.6' env: TOXENV=py36-dj1.10-dt1.6-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.7-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.8-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.9-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.10-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.11-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.12-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.13-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.14-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.15-tests - - python: '3.6' - env: TOXENV=py36-dj1.10-dt1.16-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.5-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.6-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.7-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.8-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.9-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.10-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.11-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.12-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.13-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.14-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.15-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dt1.16-tests - python: '2.7' env: TOXENV=py27-flake - python: '3.6' env: TOXENV=py36-flake - - python: '3.6' - env: TOXENV=py36-isort allow_failures: - python: '3.6' env: TOXENV=py36-djmaster-dtmaster-tests + - python: '3.6' + env: TOXENV=py36-djmaster-dt1.21-tests + - python: '3.6' + env: TOXENV=py36-djmaster-dt2.0-tests - python: '3.6' env: TOXENV=py36-dj2.0-dtmaster-tests - python: '3.6' env: TOXENV=py36-dj2.1-dtmaster-tests - - python: '2.7' - env: TOXENV=py27-dj1.11-dtmaster-tests - - python: '3.6' - env: TOXENV=py36-dj1.11-dtmaster-tests + install: - - pip install tox>=2.5.0 + - pip install tox>=3.1.2 script: - tox diff --git a/README.rst b/README.rst index 719580a..f6f13ed 100644 --- a/README.rst +++ b/README.rst @@ -24,8 +24,8 @@ Using JQuery, Bootstrap3 or Bootstrap4 and Django >=1.9. - Tested by tox with: - * Python :2.7, 3.6, 3.7 - * Django : 1.9, 1.10, 1.11, 2.0, 2.1 + * Python :2.7, 3.6 + * Django : 1.9, 1.10, 1.11, 2.0, 2.1, master * django-tables2 : 1.5, 1.6, ..., 1.21, 2.0, master - Supported: @@ -144,7 +144,7 @@ To use app, you must inherit your table class from ``django_tables2_column_shift {% extends "base.html" %} {% load django_tables2 %} {% render_table table %} - + To retrieve the invisible columns you can use the ``$.django_tables2_column_shifter_hidden()`` API. You can either pass the 0-based index of the table in the page (i.e use ``$.django_tables2_column_shifter_hidden(1)`` to get the hidden columns for the 2nd table in the page) or just use it without parameters to retrieve the hidden columns for the first table. This API returns an array with the invisible column names. These columns can then be used when you want to export only the visible columns, ie when the user clicks on the export button it would append an ``&excluded_columns=col1,col2`` to the export button's ``href`` which would then be used by the django-tables2 ``TableExporter`` (http://django-tables2.readthedocs.io/en/latest/pages/export.html#excluding-columns) to exclude these cols, i.e something like diff --git a/requirements-dev.txt b/requirements-dev.txt index c8a0134..9872225 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ -Django>=2.1 -django-tables2>=1.21.0 +Django>=2.1.2 +django-tables2>=2.0.1 tox>=3.1.2 flake8 twine diff --git a/testproject/requirements.txt b/testproject/requirements.txt index 3e24f20..5311fc3 100644 --- a/testproject/requirements.txt +++ b/testproject/requirements.txt @@ -1,3 +1,2 @@ -Django==2.1 -django-tables2==2.0.0a4 -../. +Django==2.1.2 +django-tables2==2.0.1 diff --git a/tox.ini b/tox.ini index ebc91f7..5fb86df 100644 --- a/tox.ini +++ b/tox.ini @@ -1,52 +1,43 @@ [tox] +minversion = 1.8 envlist= py36-djmaster-dtmaster-tests, - {py36}-dj{2.0,2.1}-dt{1.17,1.18,1.19,1.21,master}-tests, - {py27,py36}-dj{1.11}-dt{1.17,1.18,1.19,1.21,master}-tests, - {py27,py36}-dj{1.9,1.10,1.11}-dt{1.5,1.6,1.7,1.8,1.9,1.10,1.11,1.12,1.13,1.14,1.15,1.16}-tests, + py36-djmaster-dt{1.21,2.0}-tests, + py36-dj{2.0,2.1}-dtmaster-tests, + + py36-dj{2.0,2.1}-dt{1.21,2.0}-tests, + + {py27,py36}-dj{1.11}-dt{1.7,1.21}-tests, + {py27,py36}-dj{1.9,1.10}-dt{1.5,1.6}-tests, + {py27,py36}-{flake}, - py36-isort [testenv] basepython = py27: python2.7 py36: python3.6 -usedevelop = True -recreate = True +pip_pre = true deps = flake8 - isort dj1.9: Django>=1.9,<1.10 dj1.10: Django>=1.9,<1.11 dj1.11: Django>=1.11,<1.12 - dj2.0: Django>=2.0,<2.1 - dj2.1: Django>=2.1,<2.2 + dj2.0: Django>=1.11,<1.12 djmaster: https://github.com/django/django/archive/master.tar.gz - dt1.1: django-tables2==1.1.8 - dt1.2: django-tables2==1.2.6 - dt1.3: django-tables2==1.3.0 - dt1.4: django-tables2==1.4.2 - dt1.5: django-tables2==1.5.0 - dt1.6: django-tables2==1.6.1 - dt1.7: django-tables2==1.7.1 - dt1.8: django-tables2==1.8.0 - dt1.9: django-tables2==1.9.1 - dt1.10: django-tables2==1.10.0 - dt1.11: django-tables2==1.11.0 - dt1.12: django-tables2==1.12.0 - dt1.13: django-tables2==1.13.0 - dt1.14: django-tables2==1.14.2 - dt1.15: django-tables2==1.15.0 - dt1.16: django-tables2==1.16.0 - dt1.17: django-tables2==1.17.1 - dt1.18: django-tables2==1.18.0 - dt1.19: django-tables2==1.19.0 - dt1.21: django-tables2==1.21.2 + dt1.1: django-tables2>=1.1,<1.2 + dt1.2: django-tables2>=1.2,<1.3 + dt1.3: django-tables2>=1.3,<1.4 + dt1.4: django-tables2>=1.4,<1.5 + dt1.5: django-tables2>=1.5,<1.6 + dt1.6: django-tables2>=1.6,<1.7 + dt1.7: django-tables2>=1.7,<1.8 + dt1.21: django-tables2>=1.21,<2.0 + dt2.0: django-tables2>=2.0,<2.1 + dt2.1: django-tables2>=2.1,<2.2 dtmaster: https://github.com/bradleyayers/django-tables2/archive/master.zip commands = tests: ./runtests.py flake: flake8 - isort: isort -rc -w80 -m3 -tc -c -df django_tables2_column_shifter runtests.py