Skip to main content

Importing and exporting of data, and other file operations for Django apps

Project description

Django I/O

Importing and exporting of data, and other file operations for Django apps

Quick start

pip install django-io

Add django_io to INSTALLED_APPS

INSTALLED_APPS = [
    ...,
    'django_io',
]

Create a form to upload your data and save it, and the view to show the form. In the admin panel for the model you are importing:

@admin.register(SomeModel)
class SomeModelAdmin(
    DataImportableAdmin,
    admin.ModelAdmin
):
    upload_url = reverse_lazy('app:model:upload')  # path to the view

Development and Testing

IDE Setup

Add the example directory to the PYTHONPATH in your IDE to avoid seeing import warnings in the tests modules. If you are using PyCharm, this is already set up.

Running the Tests

Install requirements

pip install -r requirements.txt

For local environment

pytest

For all supported environments

tox

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-io-0.1.0.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

django_io-0.1.0-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

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