Skip to content

Commit

Permalink
Improve error message if openpyxl is not installed (jieter#816)
Browse files Browse the repository at this point in the history
fixes: jieter#807
  • Loading branch information
jieter authored and Alirezaja1384 committed Dec 27, 2022
1 parent a6cf73f commit f731e12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion django_tables2/export/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def export(self):
"""
Returns the string/bytes for the current export format
"""
return getattr(self.dataset, self.format)
return self.dataset.export(self.format)

def response(self, filename=None):
"""
Expand Down
1 change: 1 addition & 0 deletions tests/app/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

INSTALLED_APPS = [
"django.contrib.auth",
Expand Down

0 comments on commit f731e12

Please sign in to comment.