Skip to content

Commit 2acc654

Browse files
committed
Some typos and clarifications
* I don't know what the following is referring to: ModelResource class created this way is equal as in :ref:`base-modelresource`. * The use case for Deleting data is not clear
1 parent 77395d0 commit 2acc654

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

docs/getting_started.rst

+19-18
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Creating import-export resource
3939
-------------------------------
4040

4141
To integrate `django-import-export` with ``Book`` model, we will create
42-
resource class that will describe how this resource can be imported or
42+
a resource class that will describe how this resource can be imported or
4343
exported.
4444

4545
::
@@ -56,7 +56,7 @@ exported.
5656
Exporting data
5757
--------------
5858

59-
Now that we have defined resource class, we can export books::
59+
Now that we have defined a resource class, we can export books::
6060

6161
>>> dataset = BookResource().export()
6262
>>> print dataset.csv
@@ -67,12 +67,12 @@ Customize resource options
6767
--------------------------
6868

6969
By default ``ModelResource`` introspects model fields and creates
70-
``import_export.fields.Field`` attribute with appopriate widget for each
71-
field.
70+
``import_export.fields.Field`` attributes with an appopriate widget
71+
for each field.
7272

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

7777
class BookResource(resources.ModelResource):
7878

@@ -102,7 +102,7 @@ model relationships::
102102
Declaring fields
103103
----------------
104104

105-
It is possible to override resource fields to change some of it's
105+
It is possible to override a resource field to change some of it's
106106
options::
107107

108108
from import_export import fields
@@ -113,7 +113,7 @@ options::
113113
class Meta:
114114
model = Book
115115

116-
Other fields, that are not existing in target model may be added::
116+
Other fields that are not existing in the target model may be added::
117117

118118
from import_export import fields
119119
@@ -132,7 +132,7 @@ Other fields, that are not existing in target model may be added::
132132
Advanced data manipulation
133133
--------------------------
134134

135-
Not all data can be easily pull off an object/model attribute.
135+
Not all data can be easily extracted from an object/model attribute.
136136
In order to turn complicated data model into a (generally simpler) processed
137137
data structure, ``dehydrate_<fieldname>`` method should be defined::
138138

@@ -151,12 +151,12 @@ data structure, ``dehydrate_<fieldname>`` method should be defined::
151151
Customize widgets
152152
-----------------
153153

154-
``ModelResource`` creates field with default widget for given field type.
155-
If widget should be initialized with different arguments, set ``widgets``
156-
dict.
154+
``ModelResource`` creates a field with a default widget for a given field
155+
type. If the widget should be initialized with different arguments, set the
156+
``widgets`` dict.
157157

158-
In this example widget for ``published`` field is overriden to
159-
use different date format. This format will be used both for importing
158+
In this example widget, the ``published`` field is overriden to use a
159+
different date format. This format will be used both for importing
160160
and exporting resource.
161161

162162
::
@@ -189,11 +189,11 @@ Let's import data::
189189
False
190190
>>> result = book_resource.import_data(dataset, dry_run=False)
191191

192-
In 4th line we use ``modelresource_factory`` to create default
192+
In 4th line we use ``modelresource_factory`` to create a default
193193
``ModelResource``. ModelResource class created this way is equal
194194
as in :ref:`base-modelresource`.
195195

196-
In 5th line ``Dataset`` with subset of ``Book`` fields is created.
196+
In 5th line a ``Dataset`` with subset of ``Book`` fields is created.
197197

198198
In rest of code we first pretend to import data with ``dry_run`` set, then
199199
check for any errors and import data.
@@ -227,7 +227,8 @@ Admin integration
227227
-----------------
228228

229229
Admin integration is achived by subclassing
230-
``ImportExportModelAdmin`` or one of mixins::
230+
``ImportExportModelAdmin`` or one of the available mixins (``ImportMixin``,
231+
``ExportMixin``, or ``ImportExportMixin``)::
231232

232233
from import_export.admin import ImportExportModelAdmin
233234

0 commit comments

Comments
 (0)