Skip to content

Commit a07159e

Browse files
committed
Merge pull request #50 from crccheck/all-http-responses
All the http responses
2 parents 310d086 + 3785cf9 commit a07159e

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

Diff for: .travis.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
language: python
2+
# DELETEME TravisCI support for Python 3.5
3+
# https://github.com/travis-ci/travis-ci/issues/4794
4+
addons:
5+
apt:
6+
sources:
7+
- deadsnakes
8+
packages:
9+
- python3.5
210
# Generate this env list with:
311
# tox -l | awk '{ print " - TOX_ENV="$0}'
412
env:
@@ -12,11 +20,11 @@ env:
1220
- TOX_ENV=django17-py34
1321
- TOX_ENV=django18-py27
1422
- TOX_ENV=django18-py34
23+
- TOX_ENV=django18-py35
1524
- TOX_ENV=django19-py27
1625
- TOX_ENV=django19-py34
17-
# pending full travisci support for python 3.5
18-
# - TOX_ENV=django18-py35
19-
- TOX_ENV=coveralls-django18-py27
26+
- TOX_ENV=django19-py35
27+
- TOX_ENV=coveralls-django19-py27
2028
install: pip install tox coveralls
2129
script: tox -e $TOX_ENV
2230
after_success: coveralls

Diff for: django_object_actions/utils.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from django.contrib import messages
77
from django.core.urlresolvers import reverse
88
from django.db.models.query import QuerySet
9-
from django.http import Http404, HttpResponse, HttpResponseRedirect
9+
from django.http import Http404, HttpResponseRedirect
10+
from django.http.response import HttpResponseBase
1011
from django.views.generic import View
1112
from django.views.generic.detail import SingleObjectMixin
1213

@@ -172,7 +173,7 @@ def get(self, request, **kwargs):
172173
raise Http404(u'Tool does not exist')
173174

174175
ret = tool(request, obj)
175-
if isinstance(ret, HttpResponse):
176+
if isinstance(ret, HttpResponseBase):
176177
return ret
177178

178179
back = reverse(self.back, args=(kwargs['pk'],))
@@ -186,10 +187,8 @@ def message_user(self, request, message):
186187
Mimic Django admin actions's `message_user`.
187188
188189
Like the second example:
189-
https://docs.djangoproject.com/en/1.7/ref/contrib/admin/actions/#custom-admin-action
190+
https://docs.djangoproject.com/en/1.9/ref/contrib/admin/actions/#custom-admin-action
190191
"""
191-
# copied from django.contrib.admin.options
192-
# included to mimic admin actions
193192
messages.info(request, message)
194193

195194

Diff for: setup.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
setup(
55
name='django-object-actions',
66
version='0.6.0',
7-
author="Chris Chang",
7+
author='Chris Chang',
88
author_email='c@crccheck.com',
9-
url="https://github.com/crccheck/django-object-actions",
9+
url='https://github.com/crccheck/django-object-actions',
1010
packages=[
1111
'django_object_actions',
1212
],
@@ -16,11 +16,11 @@
1616
long_description=open('README.rst').read(),
1717
classifiers=[
1818
'Development Status :: 4 - Beta',
19-
"Framework :: Django",
20-
"Intended Audience :: Developers",
21-
"License :: OSI Approved :: Apache Software License",
22-
"Operating System :: OS Independent",
23-
"Programming Language :: Python :: 2",
19+
'Framework :: Django',
20+
'Intended Audience :: Developers',
21+
'License :: OSI Approved :: Apache Software License',
22+
'Operating System :: OS Independent',
23+
'Programming Language :: Python :: 2',
2424
'Programming Language :: Python :: 2.6',
2525
'Programming Language :: Python :: 2.7',
2626
'Programming Language :: Python :: 3',

Diff for: tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ envlist =
88
django18-{py27,py34,py35},
99
django19-{py27,py34,py35},
1010
# run one of the tests again but with coverage
11-
coveralls-django18-py27,
11+
coveralls-django19-py27,
1212
skipsdist = True
1313

1414
[testenv]

0 commit comments

Comments
 (0)