Last active
August 29, 2015 14:21
-
-
Save jheasly/e94c8c283b103d954159 to your computer and use it in GitHub Desktop.
Non-encoded object_list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.views.generic.list_detail import object_list | |
from foo.models import Baz | |
... | |
def foo(request): | |
response = object_list( | |
request, | |
queryset = Baz.objects.order_by('date'), | |
template_name = 'my_template.html', | |
mimetype = 'text/plain', | |
) | |
response['Content-Disposition'] = 'attachment; filename=InDesign_tagged_text.txt' | |
return response | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment