2021-12-21 21:45:50 +00:00
|
|
|
# Import/Export
|
2021-10-30 21:52:49 +00:00
|
|
|
|
|
|
|
Baby Buddy uses the [django-import-export application](https://django-import-export.readthedocs.io/)
|
|
|
|
to provide import and export functionality.
|
|
|
|
|
2021-12-21 21:45:50 +00:00
|
|
|
## Export
|
2021-10-30 21:52:49 +00:00
|
|
|
|
|
|
|
Export actions are accessible from Baby Buddy's "Database Admin" area (the
|
|
|
|
Django admin interface). For example, to export all diaper change entries from
|
|
|
|
Baby Buddy as an Excel file:
|
|
|
|
|
|
|
|
1. Log in as a user with "staff" access.
|
|
|
|
|
|
|
|
1. From the user menu, click "Database Admin" under the "Site" heading.
|
|
|
|
|
|
|
|
1. Click "Diaper Changes" in the list of data types.
|
|
|
|
|
|
|
|
1. Click the "Export" button above the filters list on the right side of the
|
|
|
|
screen.
|
|
|
|
|
|
|
|
1. Select the "xlxs" format and click "Submit"
|
|
|
|
|
|
|
|
Note: any applied filters will also filter the exported entries. Alternatively,
|
|
|
|
on the Diaper Change list screen (step 3 above), it is possible to select one
|
|
|
|
or many individual records and select "Export selected Diaper Changes" from the
|
|
|
|
"Actions" list.
|
|
|
|
|
2021-12-21 21:45:50 +00:00
|
|
|
## Import
|
2021-10-30 21:52:49 +00:00
|
|
|
|
|
|
|
Import actions are accessible from Baby Buddy's "Database Admin" area (the
|
|
|
|
Django admin interface). From the list of entry types in the Database Admin,
|
|
|
|
select the type to import and click the "Import" button on the list page. The
|
|
|
|
import screen for a particular type will list the fields generally expected to
|
|
|
|
be present for an import. Multiple file types -- including csv, xlsx, etc. --
|
|
|
|
are supported for the import.
|
|
|
|
|
|
|
|
The import pages do not provide *detailed* information about the required data
|
2021-10-31 22:11:07 +00:00
|
|
|
and formats. All rows will be checked for errors on import and any issues will
|
|
|
|
be reported on screen and will need to be resolved before the import can be
|
|
|
|
performed.
|
2021-10-30 21:52:49 +00:00
|
|
|
|
|
|
|
See the [example import files](/core/tests/import) used for tests to get an idea
|
|
|
|
of the expected data format.
|