Skip to content

Commit 507cec3

Browse files
committed
fix broken py3 build and instal django 1.6 for python 2.6
1 parent 0ba29de commit 507cec3

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ install:
1616
- pip install -r requirements.txt
1717
- pip install -r test_requirements.txt --use-mirrors
1818
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install pyexcel-ods; fi
19+
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install django==1.6; fi
1920
- if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then pip install pyexcel-ods; fi
21+
- if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then pip install django==1.7.1; fi
22+
- if [[ $TRAVIS_PYTHON_VERSION == "3.2" ]]; then pip install django==1.7.1; fi
23+
- if [[ $TRAVIS_PYTHON_VERSION == "3.4" ]]; then pip install django==1.7.1; fi
2024
- if [[ $TRAVIS_PYTHON_VERSION == "3.3" ]]; then pip install git+https://github.com/chfw/ezodf.git; fi
2125
- if [[ $TRAVIS_PYTHON_VERSION == "3.4" ]]; then pip install git+https://github.com/chfw/ezodf.git; fi
2226
- if [[ $TRAVIS_PYTHON_VERSION == "3.3" ]]; then pip install pyexcel-ods3; fi

README.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ or clone it and install it::
7474

7575
Installation of individual plugins , please refer to individual plugin page.
7676

77+
Setup
78+
======
79+
80+
You will need to update your *settings.py*::
81+
82+
FILE_UPLOAD_HANDLERS = ("django_excel.ExcelMemoryFileUploadHandler",
83+
"django_excel.TemporaryExcelFileUploadHandler")
84+
7785

7886
Dependencies
7987
=============

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
pyexcel>=0.1.2
22
pyexcel-webio>=0.0.1
3-
Django==1.7.1

testResponse.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def setUp(self):
5050

5151
def test_download(self):
5252
for file_type in FILE_TYPE_MIME_TABLE.keys():
53-
print file_type
53+
print(file_type)
5454
response = self.client.get("/polls/download/"+file_type)
5555
assert response['Content-Type'] == FILE_TYPE_MIME_TABLE[file_type]
5656
sheet = pe.load_from_memory(file_type, response.content)
@@ -71,7 +71,6 @@ def test_parse_single_sheet(self):
7171
with open(tmp_filename, "rb") as fp:
7272
response = self.client.post('/polls/parse/'+data_struct_type,
7373
data={"file": fp})
74-
print json.loads(response.content)
7574
assert json.loads(response.content) == test_sample[data_struct_type]
7675
os.unlink(tmp_filename)
7776

@@ -91,7 +90,6 @@ def test_parse_book(self):
9190
with open(tmp_filename, "rb") as fp:
9291
response = self.client.post('/polls/parse/'+data_struct_type,
9392
data={"file": fp})
94-
print json.loads(response.content)
9593
assert json.loads(response.content) == expected_dict
9694
os.unlink(tmp_filename)
9795

0 commit comments

Comments
 (0)