Skip to content

Commit

Permalink
Merge pull request #241 from manelclos/patch-2
Browse files Browse the repository at this point in the history
make 'fields' option more explicit
  • Loading branch information
bmihelac committed Apr 15, 2015
2 parents 0be7cc1 + db4b71d commit e974b6b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@ By default ``ModelResource`` introspects model fields and creates
for each field.

To affect which model fields will be included in an import-export
resource, use the ``fields`` option to whitelist fields or ``exclude``
option to blacklist fields::
resource, use the ``fields`` option to whitelist fields::

class BookResource(resources.ModelResource):

class Meta:
model = Book
fields = ('id', 'name', 'price',)

Or the ``exclude`` option to blacklist fields::

class BookResource(resources.ModelResource):

Expand Down

0 comments on commit e974b6b

Please sign in to comment.