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.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_db_xlsx-1.0.1-py2.py3-none-any.whl (5.9 kB) Copy SHA256 hash SHA256 Wheel 2.7
django-db-xlsx-1.0.1.tar.gz (4.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page