Metadata-Version: 2.1
Name: django-admin-bulk-io
Version: 1.3
Summary: This package allows you to import and export data in your Django admin.
Home-page: https://github.com/mohitprajapat2001/django-admin-bulk-io
Author: Mohit Prajapat
Author-email: mohitdevelopment2001@gmail.com
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: django>=5.1
Requires-Dist: djangorestframework>=3.15.2
Requires-Dist: pandas>=2.2.3

# Django Admin Bulk IO

This package allows you to import and export data in your Django admin. It supports various formats like CSV, JSON, and XML.

## Features

* **Import data:** Easily import data into your Django models from CSV, JSON, and XML files.
* **Export data:** Export data from your Django models to CSV, JSON, and XML files.
* **Admin integration:** Seamlessly integrates with the Django admin interface.
* **Customizable serializers:**  Allows customization of how data is serialized and deserialized.
* **Support for related fields:** Handles import/export of related model data.
* **Error handling and reporting:** Provides detailed error messages during import/export operations.

## Installation

    ```bash
    pip install django-admin-bulk-io
    ```

## Configuration

1. Add django_admin_bulk_io to your INSTALLED_APPS in settings.py:

    ```python
    INSTALLED_APPS = [
        # ... other apps
        'django_admin_bulk_io',
    ]
    ```

2. In your admin.py, import and use the BulkImportMixin and BulkExportMixin:

    ```python
    from django.contrib import admin
    from django_admin_bulk_io.admin import BulkImportMixin, BulkExportMixin

    @admin.register(YourModel)
    class YourModelAdmin(admin.ModelAdmin):
        pass
    ```

## Usage

### Import

In the Django admin, navigate to the list view of the model you want to import data into.

1. Click on the "Import" button.
2. Choose the file you want to import and select the format (CSV, JSON, or XML).
3. Click "Import" to begin the import process.
Export

### Export

1. Select the objects you want to export (or select all).
2. From the "Action" dropdown, choose "Export selected objects".
Choose the desired export format (CSV, JSON, or XML).

## Contributing

Contributions are welcome! Please submit bug reports and pull requests.

## License

This project is licensed under the MIT License.
