Easily create XLSX documents with Django
Project description
This is a wrapper for openpyxl which makes creating XLSX documents with the purpose of exporting data less boring:
from xlsxdocument import XLSXDocument def xlsx_export(request): some_data = Bla.objects.all() xlsx = XLSXDocument() xlsx.table_from_queryset(Bla.objects.all()) return xlsx.to_response('bla.xlsx')
You can also easily add the facility to export rows to Django’s administration interface:
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from xlsxdocument import export_selected from app import models class AttendanceAdmin(admin.ModelAdmin): list_filter = ('event',) actions = (export_selected,) admin.site.register(models.Event) admin.site.register(models.Attendance, AttendanceAdmin)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xlsxdocument-1.0.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for xlsxdocument-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc0981d52d67b155a7cef3a91c04efcf34076ea7d0fec6dae4fd79217b45870e |
|
MD5 | bdf2b49488c977e9264e67c336cfa865 |
|
BLAKE2b-256 | 1322a2622c771bc1cae1d6d54679bbf90dddf4d3de12fb2dba6c8a79abd2f9b0 |