Skip to content

Instantly share code, notes, and snippets.

@bencleary
Created January 16, 2018 19:29
Show Gist options
  • Select an option

  • Save bencleary/203deb0e70fc11fc61ecce10b7379e4e to your computer and use it in GitHub Desktop.

Select an option

Save bencleary/203deb0e70fc11fc61ecce10b7379e4e to your computer and use it in GitHub Desktop.
class Csv(GenerateCSVMixin):
custom_headers = [(h.column) for h in Sales._meta.get_fields()]
queryset = Sales.objects.filter(id=27)
custom_queryset = queryset
class Csv(GenerateCSVMixin):
model = Sales
download_file = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment