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.

Files for django-db-xlsx, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_db_xlsx-1.0.1-py2.py3-none-any.whl (5.9 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size django-db-xlsx-1.0.1.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page