Skip to content

Commit

Permalink
Added django==1.8; fix some bug; test with debug=False; wheel support…
Browse files Browse the repository at this point in the history
…; changelog
  • Loading branch information
marazmiki committed Apr 4, 2015
1 parent 5ea21e8 commit 0a608fd
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 12 deletions.
File renamed without changes.
6 changes: 4 additions & 2 deletions .travis.yml
Expand Up @@ -6,8 +6,10 @@ python:
- "3.4"

env:
- DJANGO=1.5.9
- DJANGO=1.6.6
- DJANGO=1.5.12
- DJANGO=1.6.11
- DJANGO=1.7.7
- DJANGO=1.8

install:
- pip install -q Django==$DJANGO
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.rst
@@ -0,0 +1,10 @@
0.2
---
* Added CHANGELOG;
* Updated head version of Django (include 1.8);
* Improved pep8;
* Wheel support

0.1
---
* Initial release
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -3,12 +3,13 @@ test:

release:
python setup.py sdist --format=zip,bztar,gztar register upload
python setup.py bdist_wheel register upload

flake8:
flake8 --max-complexity 12 --ignore=E126,E501 onpay
flake8 onpay

coverage:
coverage run --include=onpay/* setup.py test
coverage run --rcfile=.coveragerc --include=onpay/* setup.py test
coverage html

coveralls:
Expand Down
12 changes: 11 additions & 1 deletion README.rst
@@ -1,7 +1,7 @@
django-onpay
============

.. image:: https://badge.fury.io/py/django-ulogin.png
.. image:: https://badge.fury.io/py/django-onpay.png
:target: http://badge.fury.io/py/django-onpay

.. image:: https://travis-ci.org/marazmiki/django-onpay.png?branch=master
Expand All @@ -12,3 +12,13 @@ django-onpay

.. image:: https://pypip.in/d/django-onpay/badge.png
:target: https://pypi.python.org/pypi/django-onpay

.. image:: https://pypip.in/d/django-onpay/badge.png
:target: https://pypi.python.org/pypi/django-onpay
:alt: Latest version on PyPI

.. image:: https://pypip.in/wheel/django-onpay/badge.svg
:target: https://pypi.python.org/pypi/django-onpay/
:alt: Wheel Status


2 changes: 1 addition & 1 deletion onpay/__init__.py
Expand Up @@ -7,4 +7,4 @@


def get_version():
return '0.1'
return '0.2'
2 changes: 1 addition & 1 deletion onpay/forms.py
Expand Up @@ -44,5 +44,5 @@ class PayForm(CheckForm):
def clean_paymentDateTime(self):
try:
return parse(self.cleaned_data['paymentDateTime'])
except TypeError:
except (ValueError, TypeError):
raise forms.ValidationError('Wrong paymentDateTime value')
4 changes: 2 additions & 2 deletions onpay/models.py
Expand Up @@ -51,12 +51,12 @@ class Order(models.Model):
(STATE_FAILURE, _('Failed')),
(STATE_WAITING, _('Waiting')),
(STATE_EXPIRED, _('Expired')),
))
))
mode = models.IntegerField(_('mode'), default=MODE_LIVE,
choices=(
(MODE_LIVE, _('live')),
(MODE_TEST, _('text')),
))
))

def mark_as_success(self):
self._mark(state=self.STATE_SUCCESS, signal=order_success)
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
@@ -0,0 +1,3 @@
[bdist_wheel]
universal = 1

11 changes: 8 additions & 3 deletions tests.py
Expand Up @@ -11,8 +11,9 @@


settings.configure(
DEBUG=True,
ROOT_URLCONF='django_ulogin.tests.urls',
DEBUG=False,
ROOT_URLCONF='onpay.urls',
MIDDLEWARE_CLASSES=(),
INSTALLED_APPS=(
'django.contrib.auth',
'django.contrib.contenttypes',
Expand All @@ -29,6 +30,10 @@

def main():
from django.test.utils import get_runner
import django

if hasattr(django, 'setup'):
django.setup()

find_pattern = 'onpay'

Expand All @@ -41,4 +46,4 @@ def main():


if __name__ == '__main__':
main()
main()

0 comments on commit 0a608fd

Please sign in to comment.