import_export.rst 1.1 KB

1234567891011121314151617181920212223242526
  1. Import/Export
  2. =============
  3. ``wagtail-import-export`` is included in the CMS. You can find documentation for it
  4. `here <https://github.com/torchbox/wagtail-import-export>`_. In addition to the JSON
  5. import/export functionality that the package includes, we have added the ability to create
  6. pages by importing CSV files.
  7. In the CSV each row will be a new page and each column header will correspond to an attribute
  8. of that page. On the import CSV page, you will select where you want the pages to live and what
  9. page type they should be created as. A use case for this functionality would be if your site needs
  10. to add several hundred locations as pages. These locations come from a CSV dump from some report
  11. generating software. Your CSV could look something like this::
  12. title address latitude longitude
  13. Store 1 123 Street 20.909 -15.32
  14. Store 2 456 Avenue 34.223 87.2331
  15. ...
  16. ...
  17. ``title``, ``address``, ``latitude``, ``longitude`` are all fields on your Page model that you will
  18. be importing as.
  19. .. note::
  20. Your CSV file must be encoded as ASCII or UTF-8.
  21. UTF-8-BOM will cause an error.