Skip to content

Full-feature package for easy importing and exporting of data

License

Notifications You must be signed in to change notification settings

luzfcb/django-mtr-sync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-mtr-sync (beta testing)

Full-feature package for easy importing and exporting of data

Scrutinizer Code Quality Code Coverage Build Status Documentation Status

Project updates here http://mtr.website

Thank you guys for funding this project at kickstarter

Documentation

Includes only docstrings from module http://django-mtr-sync.rtfd.org/

How to use

  1. Install package: pip install git+https://github.com/mtrgroup/django-mtr-sync.git
  2. Add mtr.sync to INSTALLED_APPS in your settings file
  3. Migrate models ./manage.py migrate
  4. Configure Celery
  5. Create settings for import or export data at /admin/mtrsync/settings/ and run action Sync data to start process.

Video demonstration

Features

  • Import (only creating), export data
  • Processor API for supporting other formats
  • Uses Celery for background tasks and for processing large volumes of data
  • Creates reports about importing and exporting operations
  • Auto discovering models for use in package
  • Data range settings (start, end cells in table), for example, if you need to import data where there is a header with logo or any other unnecessary information
  • Field settings:
    • maps model fields with data fields
    • adds and removes fields (ability to skip fields on import)
    • set start cell of exporting data
    • related models(fields, supports only ForeignKey, ManyToMany) import-export by choosing main model
  • Supports: CSV(native python3, unicodecsv python2), XLS (using: xlwt-future, xlrd), XLSX (using: openpyxl optimized writer, reader mode, for fast processing of large volumes of data) and ODS(odfpy)
  • Saves import, export settings for the processing of data from various sources and for simplicity
  • Integration with standart django admin app
  • Custom filters (querysets, data-sets)
  • Action handler for more flexebility (for example not create model but generate source code for it, prepare data for model)
  • Supports: Django 1.6-1.8 Python 2.7, 3.3+

Working on

  • Shortcuts at admin app
  • Modeltransation
  • Multilingual (i18n) will be added to transifex for translating
  • Documentation
  • Different source input (url)
  • Inline support
  • Dashboard without admin
  • Adding support of JSON, YAML, XML
  • Permission control for import settings using django auth, to minimize human errors. For example, this would allow only the manager to choose the settings template for import and to upload files without configuring
  • Export templates for (XLS, XLSX, ODS)
    • upload custom templates
  • Value processors
    • API for writing own value converters and filters
    • (not usable, moved to code) Create processor from admin panel using embedded django template language, for example:
    • {% if field|is_number %}{{ field/2 }}{% endif %} (pseudo code)
    • Standard value processors for various types and actions
      • If object exists in database and does not exist in import data, then delete it
      • If object exists in database and does not exist in import data, then set object parameter to whatever you want
      • Create object if it doesn't exist in database with current parameters from import
      • Assign object to main model field (ForeignKey, ManyToManyField), for example, category or tags separated by coma
  • Template integration with django-grapelli, django-suit
  • Periodic import, export for automatic updates
  • Video tutorial how to set up package and use it
  • Plugins for editors ckeditor and redactor — insert file from already exported files

About

Full-feature package for easy importing and exporting of data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.6%
  • HTML 2.4%