Login

Snippets by namlook

Snippet List

A streamable "export to CSV" admin action

This snippets is inspired from [#2995](https://djangosnippets.org/snippets/2995/) but add the following: * get rid of `singledispatch` so we can use it with python2 without pip installing anything * streaming capabilities * the configuration params (header, fields, exclude...) are passed to the action function so we don't pollute the ModelAdmin class * fix utf8 issue in header

  • admin
  • export
  • csv
  • action
  • stream
  • export-csv
Read More

namlook has posted 1 snippet.