Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to the latest Django version #6

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.pyc
dist/*
*.egg-info/*
.idea
.vscode
venv
44 changes: 23 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
env:
- DJANGO="django>=1.7,<1.8"
- DJANGO="django>=1.8,<1.9"
- DJANGO="django>=1.9,<1.10"
- DJANGO="django>=1.10,<2.0"
- DJANGO="django>=2.0,<=3.2"
matrix:
exclude:
- python: "3.3"
env: DJANGO="django>=1.9,<1.10"
- python: "3.3"
env: DJANGO="django>=1.10,<2.0"
- python: "3.5"
env: DJANGO="django>=1.7,<1.8"
- python: "3.6"
env: DJANGO="django>=1.7,<1.8"
exclude:
- python: "2.7"
env: DJANGO="django>=1.7,<=1.11"
- python: "3.3"
env: DJANGO="django>=1.9,<1.10"
- python: "3.3"
env: DJANGO="django>=1.10,<2.0"
- python: "3.5"
env: DJANGO="django>=1.7,<1.8"
- python: "3.6"
env: DJANGO="django>=1.7,<1.8"
install:
- "pip install ."
- "pip install ${DJANGO}"
- "pip install ."
- "pip install ${DJANGO}"
script:
- "python manage.py test"
- "python manage.py test"
2 changes: 1 addition & 1 deletion djindonesiaregions/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


def populate_provinces(apps, schema_editor):
print('\n\n Populating provinces...')
print(' Populating provinces...')
with open(os.path.join(CSV_PATH, 'provinces.csv')) as provinces:
reader = csv.reader(provinces)
for i in reader:
Expand Down
2 changes: 1 addition & 1 deletion djindonesiaregions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# fix import error for django 1.5 and up
vtuple = version.get_complete_version()
if vtuple[0]< 2 and vtuple[1]<6:
if vtuple[0] < 2 and vtuple[1] < 6:
from django.utils.encoding import python_2_unicode_compatible
else:
from six import python_2_unicode_compatible
Expand Down
2 changes: 1 addition & 1 deletion djindonesiaregions/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
USE_L10N = True
USE_TZ = True

STATIC_URL = '/static/'
STATIC_URL = '/static/'
1 change: 0 additions & 1 deletion djindonesiaregions/tests/test_indonesia_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ def test_getting_individual_data(self):
self.assertEqual(district.name, 'KUNIR')
village = Village.objects.get(village_id='1103041012')
self.assertEqual(village.name, 'SILOLO')

4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
from setuptools import find_packages, setup


# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

Expand All @@ -27,5 +26,8 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)