Skip to main content

Import/export django models via xlsx

Project description

https://badge.fury.io/py/django-db-xlsx.png https://travis-ci.org/narfman0/django-db-xlsx.png?branch=master

Import/export django models from/to xlsx

Quickstart

Install django-db-xlsx:

pip install django-db-xlsx

Invoke export:

from django_db_xlsx import dump_models
return dump_models()

Invoke import (note: can import exported file):

from django_db_xlsx import load_models
<load workbook from whatever, e.g. FileField in form>
load_models(wb)

Optional setting for default models saved:

DJANGO_DB_XLSX_MODELS = [
    ('auth', 'User'),
]

Features

  • Import models via xlsx

  • Export models via xlsx

TODO

Beef up woefully lacking tests

Running Tests

Does the code actually work?:

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

License

Copyright Jon Robison 2017, see LICENSE for details

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-db-xlsx-1.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

django_db_xlsx-1.0.1-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-db-xlsx-1.0.1.tar.gz.

File metadata

File hashes

Hashes for django-db-xlsx-1.0.1.tar.gz
Algorithm Hash digest
SHA256 11d6f49038e28ca963a45331a4d0bc38751ffdd613f722335911df0be7364d2f
MD5 5ed6be007f0996246ac38757cf8df964
BLAKE2b-256 85bf902cff7fb67349c16724076bbc7d31e6dbc1d51049d3f7d3e6367235da29

See more details on using hashes here.

File details

Details for the file django_db_xlsx-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_db_xlsx-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 69349d0e715defa7748c5958184f31ccc94a08437fadf2148d1d06d2439812c0
MD5 c574239a82d540d81998dcfd77a1f8b9
BLAKE2b-256 a5069a8a498d025f39c0c2b9cd10635b356c89f61d46ac6c5c2bc8546588e166

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