Description
Django-admin-csvexport is a django-admin-action, that allows you to export the items of your django-admin changelist as csv-formatted data.
Features
selectable model-fields
related models included
customizable csv-format
view or download csv-data
Installation
Install from pypi.org:
pip install django-admin-csvexport
Add csvexport to your installed apps:
INSTALLED_APPS = [
'csvexport',
...
]
Add csvexport to the actions of your modeladmin:
from csvexport.actions import csvexport
class MyModelAdmin(admin.ModelAdmin):
...
actions = [csvexport]
Configuration
The following settings determine the depth of the model references and the value to display for empty fields:
CSV_EXPORT_REFERENCE_DEPTH = 3 CSV_EXPORT_EMPTY_VALUE = ''
Those settings define the csv-format to be used. The default values meet the unix standard csv-format:
CSV_EXPORT_DELIMITER = ',' CSV_EXPORT_ESCAPECHAR = '' CSV_EXPORT_QUOTECHAR = '"' CSV_EXPORT_DOUBLEQUOTE = True CSV_EXPORT_LINETERMINATOR = r'\n'
(Use a raw-string for newline escape sequences.)
Per default the csv-format can be adjusted by a formular when generating the csv-file. Set the following setting to False to not render such form:
CSV_EXPORT_FORMAT_FORM = True
Usage
Just use it as any django-admin-action: Select your items, choose csvexport from the admin-action-bar and go. You will be led to a formular that allows you to render your items as csv-data.
Metadata
Release files for django-admin-csvexport 1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-admin-csvexport-1.5.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_admin_csvexport-1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / django-admin-csvexport-1.5.tar.gz
| Download URL | django-admin-csvexport-1.5.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c80c768fc9d81d4c8ac8400d593b5f5933826b4e57bf8221a93309b60778aec0
|
|
BLAKE2b-256 checksum How to use checksums |
71c924109c0cf86d5fb0ca1ec6ee50cf3f767fb6580da1b8dcf63e9f88b04b7b
|
| 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Release files / django_admin_csvexport-1.5-py3-none-any.whl
| Download URL | django_admin_csvexport-1.5-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fd0c6e0cf5fc2acd43c10be849958b792ac38223d1400484d2b4df8300ea24c
|
|
BLAKE2b-256 checksum How to use checksums |
c2ac255aff0bcacaf3a4b5ecd4073254e0f111bff3a0dcc404461c8224007568
|
| 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/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|