@@ -85,7 +85,7 @@ because ``ObjectDescription`` is a special-purpose directive that's intended
85
85
for describing things like classes, functions, or, in our case, recipes. More
86
86
specifically, ``handle_signature `` implements parsing the signature of the
87
87
directive and passes on the object's name and type to its superclass, while
88
- ``add_taget_and_index `` adds a target (to link to) and an entry to the index
88
+ ``add_target_and_index `` adds a target (to link to) and an entry to the index
89
89
for this node.
90
90
91
91
We also see that this directive defines ``has_content ``, ``required_arguments ``
@@ -122,9 +122,10 @@ all it really is is a list of tuples like ``('tomato', 'TomatoSoup', 'test',
122
122
'rec-TomatoSoup',...) ``. Refer to the :doc: `domain API guide
123
123
</extdev/domainapi>` for more information on this API.
124
124
125
- These index pages can be referred by combination of domain name and its
126
- ``name `` using :rst:role: `ref ` role. For example, ``RecipeIndex `` can be
127
- referred by ``:ref:`recipe-recipe` ``.
125
+ These index pages can be referenced with the :rst:role: `ref ` role by combining
126
+ the domain name and the index ``name `` value. For example, ``RecipeIndex `` can be
127
+ referenced with ``:ref:`recipe-recipe` `` and ``IngredientIndex `` can be referenced
128
+ with ``:ref:`recipe-ingredient` ``.
128
129
129
130
.. rubric :: The domain
130
131
@@ -152,7 +153,7 @@ Moving on, we can see that we've defined ``initial_data``. The values defined in
152
153
``initial_data `` will be copied to ``env.domaindata[domain_name] `` as the
153
154
initial data of the domain, and domain instances can access it via
154
155
``self.data ``. We see that we have defined two items in ``initial_data ``:
155
- ``recipes `` and ``recipe2ingredient ``. These contain a list of all objects
156
+ ``recipes `` and ``recipe_ingredients ``. Each contains a list of all objects
156
157
defined (i.e. all recipes) and a hash that maps a canonical ingredient name to
157
158
the list of objects. The way we name objects is common across our extension and
158
159
is defined in the ``get_full_qualified_name `` method. For each object created,
@@ -214,7 +215,7 @@ You can now use the extension throughout your project. For example:
214
215
215
216
The important things to note are the use of the ``:recipe:ref: `` role to
216
217
cross-reference the recipe actually defined elsewhere (using the
217
- ``:recipe:recipe: `` directive.
218
+ ``:recipe:recipe: `` directive) .
218
219
219
220
220
221
Further reading
0 commit comments