Skip to main content

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

django-csv-admin-1.0.6.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

django_csv_admin-1.0.6-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

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

Hashes for django-csv-admin-1.0.6.tar.gz
Algorithm Hash digest
SHA256 7be7b66577067c05ff4949ae177e5439b9f0835d551f3589057b7db66b35aeff
MD5 d64103b745f8b0d8bf83e8fed2ee5cef
BLAKE2b-256 097a4b2e98b96b042f123c3c0d029eb2d90e85dd20d7546c90ac1bd0e9ab3a58

See more details on using hashes here.

File details

Details for the file django_csv_admin-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for django_csv_admin-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7d95e5748d54da9694da27589cd1f631dc2e257e2f563da3ccb3ac1ec95a0822
MD5 8bbf9004923a72259f0ce25317e1abef
BLAKE2b-256 db68f62ebba1152eb62b1813f06e5252243fbbe3f59671e45c9f153601de1fe2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page