Skip to content

Commit e18e2aa

Browse files
committed
support python3
1 parent 0a7a95d commit e18e2aa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

polls/views.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
import django_excel as excel
66
import pyexcel.ext.xls
77
import pyexcel.ext.xlsx
8-
import pyexcel.ext.ods
8+
import sys
9+
PY2 = sys.version_info[0] == 2
10+
if PY2:
11+
import pyexcel.ext.ods
12+
else:
13+
import pyexcel.ext.ods3
14+
915

1016
data = [
1117
[1, 2, 3],

0 commit comments

Comments
 (0)