Skip to content

Commit 0725027

Browse files
committed
django 2.0
1 parent 8bf2585 commit 0725027

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

.travis.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ language: python
33
matrix:
44
include:
55
- python: '3.5'
6-
env: TOXENV=py35-django111-flake
7-
- python: '3.4'
8-
env: TOXENV=py34-django110-test
9-
- python: '3.5'
10-
env: TOXENV=py35-django110-test
11-
- python: '3.6'
12-
env: TOXENV=py36-django110-test
6+
env: TOXENV=py35-django20-flake
137
- python: '3.4'
148
env: TOXENV=py34-django111-test
159
- python: '3.5'
1610
env: TOXENV=py35-django111-test
1711
- python: '3.6'
1812
env: TOXENV=py36-django111-test
13+
- python: '3.4'
14+
env: TOXENV=py34-django20-test
15+
- python: '3.5'
16+
env: TOXENV=py35-django20-test
17+
- python: '3.6'
18+
env: TOXENV=py36-django20-test
1919
install:
2020
- pip install tox
2121
script:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ django-variable-resolution-date
44
[![Build Status](https://travis-ci.org/skioo/django-variable-resolution-date.svg?branch=master)](https://travis-ci.org/skioo/django-variable-resolution-date)
55
[![PyPI version](https://badge.fury.io/py/django-variable-resolution-date.svg)](https://badge.fury.io/py/django-variable-resolution-date)
66
[![Requirements Status](https://requires.io/github/skioo/django-variable-resolution-date/requirements.svg?branch=master)](https://requires.io/github/skioo/django-variable-resolution-date/requirements/?branch=master)
7-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
88

99

1010
A django field that can represent either a year, or a year and a month, or a full calendar date.

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
exclude = .git, .tox, .env, */migrations/*
2+
exclude = .git, .tox, .env
33
max-line-length = 119
44

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name='django-variable-resolution-date',
6-
version='0.1.5',
6+
version='0.1.6',
77
description='A django field that can represent either a year, or a year and a month, or a full calendar date',
88
long_description='',
99
author='Nicholas Wolff',
@@ -14,14 +14,14 @@
1414
'variable_resolution_date',
1515
],
1616
install_requires=[
17-
'Django>=1.10',
17+
'Django>=1.11',
1818
],
1919
licence='MIT',
2020
classifiers=[
2121
'Development Status :: 5 - Production/Stable',
2222
'Environment :: Web Environment',
23-
'Framework :: Django :: 1.10',
2423
'Framework :: Django :: 1.11',
24+
'Framework :: Django :: 2.0',
2525
'Intended Audience :: Developers',
2626
'License :: OSI Approved :: MIT License',
2727
'Operating System :: OS Independent',

tox.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist =
3-
{py34,py35,py36}-{django110,django111}-test
4-
py35-django111-{flake}
3+
{py34,py35,py36}-{django111,django20}-test
4+
py35-django20-{flake}
55

66
[testenv]
77
basepython =
@@ -12,8 +12,8 @@ commands =
1212
test: py.test tests
1313
flake: flake8
1414
deps =
15-
django110: Django>=1.10,<1.11
1615
django111: Django>=1.11,<1.12
16+
django20: Django>=2.0,<2.1
1717
pytest-django
1818
flake: flake8
1919

variable_resolution_date/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
import datetime
1616

17+
import re
1718
from django.core.exceptions import ValidationError
1819
from django.db import models
1920
from django.utils.encoding import force_text
20-
import re
2121

2222
VARIABLE_RESOLUTION_DATE_RE = re.compile(r'^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$')
2323
VARIABLE_RESOLUTION_DATE_LENGTH = 10
@@ -32,7 +32,7 @@ def validate_variable_resolution_date(value):
3232
try:
3333
datetime.date(year, month, day)
3434
return
35-
except:
35+
except Exception:
3636
pass
3737
raise ValidationError('Enter a year, year-month, or year-month-day.')
3838

0 commit comments

Comments
 (0)