django-excel-export
A Django library for exporting data in xlsx, xls, docx format.
- User: admin
- Password: admin
How to install
$ pip install excel-exporter
How to use
Export is achieved by subclassing ExportAdmin, which implements export as an admin action.
# app/admin.py
from excel_exporter.admin import ExportAdmin
class PersonAdmin(ExportAdmin):
list_display = ( 'name', 'address', ...)
export_fields = ('name', 'address', ...)
What you get
You can define custom export action and add it to export_actions list:
# app/admin.py
from excel_exporter.admin import ExportAdmin
from excel_exporter.action import Docx
class PersonExportDocx(Docx):
desc = 'persons to docx'
tpl = 'persons.docx'
queryset_name = 'ps'
def get_payloads(self, queryset, list_display):
payload = super().get_payloads(queryset, list_display)
payload['test'] = 'A Big Company'
payload['logo'] = 'staticfiles/1.jpg'
return payload
class PersonaAdmin(ExportAdmin):
list_display = ( 'name', 'address', ...)
export_actions = [PersonExportDocx, ...]
What you get
See admin.py in Demo Source Code.
Metadata
Release files for excel-exporter 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| excel-exporter-0.1.3.tar.gz | 18.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| excel_exporter-0.1.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 36.9 kB
Release files / excel-exporter-0.1.3.tar.gz
| Download URL | excel-exporter-0.1.3.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a6fb9a1cca8b5ac010a05fc98e986ea3ea2c35cc49296209cf1a61762c0607e
|
|
BLAKE2b-256 checksum How to use checksums |
318b06616fa3cbf5669957ebe25577120b3d181ab54b64a8b45ce02febe6e3f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5
|
Release files / excel_exporter-0.1.3-py2.py3-none-any.whl
| Download URL | excel_exporter-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
eb115bbc6f97429704ded3e9e522a2103f537038e8721fc2a33f9a797fe8f774
|
|
BLAKE2b-256 checksum How to use checksums |
9b39b72f354299f2cc764375fc9c6c8b52372397ef5beff63841cbf7f80fcc9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5
|
Security for excel-exporter 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.