Simple app which includes ModelAdmin class for importing/exporting model data to csv file
Project description
This app includes model admin class for csv exporting and importing.
For installation just add ‘csv_admin’ to your INSTALLED_APPS
For usage add in admin.py file:
from csv_admin.admin import CSVExportAdmin
class MyAdmin(CSVExportAdmin):
date_field = 'created_at'
export_select_related = ['related_field_name']
def _get_sum(self):
sum = 1 + 2
return sum
def get_additional_fields(self) -> list:
return ['sum']
def get_additional_fields_params(self) -> dict:
return {'sum': self._get_sum}
CHANGELOG:
1.0.5: Fixed custom url issues
1.0.6: Fixed duplicating of date_field
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-csv-admin-1.0.6.tar.gz.
File metadata
- Download URL: django-csv-admin-1.0.6.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7be7b66577067c05ff4949ae177e5439b9f0835d551f3589057b7db66b35aeff
|
|
| MD5 |
d64103b745f8b0d8bf83e8fed2ee5cef
|
|
| BLAKE2b-256 |
097a4b2e98b96b042f123c3c0d029eb2d90e85dd20d7546c90ac1bd0e9ab3a58
|
File details
Details for the file django_csv_admin-1.0.6-py3-none-any.whl.
File metadata
- Download URL: django_csv_admin-1.0.6-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d95e5748d54da9694da27589cd1f631dc2e257e2f563da3ccb3ac1ec95a0822
|
|
| MD5 |
8bbf9004923a72259f0ce25317e1abef
|
|
| BLAKE2b-256 |
db68f62ebba1152eb62b1813f06e5252243fbbe3f59671e45c9f153601de1fe2
|