Skip to content

Commit 0e1aa63

Browse files
committed
Update for ORM changes (Django 1.10+ compatibility)
Closes #1, #2
1 parent 0a10e35 commit 0e1aa63

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ django-tabular-export
1313
:target: http://django-tabular-export.readthedocs.org/en/latest/?badge=latest
1414
:alt: Documentation Status
1515

16-
Simple spreadsheet exports from Django
16+
Simple spreadsheet exports from Django 1.8+
1717

1818
Documentation
1919
-------------

tabular_export/core.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ def get_field_names_from_queryset(qs):
4545
field_names = []
4646
field_names.extend(i.target.name for i in v_qs.query.select)
4747
field_names.extend(v_qs.query.extra_select.keys())
48-
try:
49-
# for django 1.10 and up (works starting in 1.8)
50-
field_names.extend(v_qs.query.annotation_select.keys())
51-
except AttributeError:
52-
field_names.extend(v_qs.query.aggregate_select.keys())
48+
field_names.extend(v_qs.query.annotation_select.keys())
5349

5450
return field_names
5551

0 commit comments

Comments
 (0)