summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManel Clos <manelclos@gmail.com>2015-04-15 12:39:07 (GMT)
committerManel Clos <manelclos@gmail.com>2015-04-15 12:39:07 (GMT)
commitc59e2220cba0eb629ec800c8b85d5cd20d8719fd (patch)
tree5c900a1b5f6f43594af9baf5fc5d78266004f427
parent8a7d97e2697baf512a88e7d2c428f5d627e1f5d4 (diff)
downloaddjango-import-export-c59e2220cba0eb629ec800c8b85d5cd20d8719fd.zip
django-import-export-c59e2220cba0eb629ec800c8b85d5cd20d8719fd.tar.gz
django-import-export-c59e2220cba0eb629ec800c8b85d5cd20d8719fd.tar.bz2
document export_order option
This is a top FAQ.
-rw-r--r--docs/getting_started.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index b3c453f..aa00898 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -80,6 +80,15 @@ option to blacklist fields::
model = Book
exclude = ('imported', )
+An explicit order for exporting fields can be set using the ``export_order`` option::
+
+ class BookResource(resources.ModelResource):
+
+ class Meta:
+ model = Book
+ fields = ('id', 'name', 'author', 'price',)
+ export_order = ('id', 'price', 'author', 'name')
+
When defining ``ModelResource`` fields it is possible to follow
model relationships::