Skip to content

Commit

Permalink
fix documentation build errors on RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed May 17, 2020
1 parent 02ec9f1 commit 3dec198
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Some recipes on how to perform certain tasks in **django-SHOP**.
Django compatibility table
==========================

=========== === === ==== ==== === === === === ===
=========== === === ==== ==== === === === ===
django-SHOP Django
----------- ----------------------------------------
\ 1.8 1.9 1.10 1.11 2.0 2.1 2.2 3.0
Expand Down
10 changes: 5 additions & 5 deletions docs/reference/inventory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In addition to the field storing the quantity in stock, add the mixin class
:class:`shop.models.product.AvailableProductMixin` to the product model declaration. Example:

.. code-block:: python
:filename: models.py
:caption: models.py
from django.db import models
from shop.models.product import BaseProduct, BaseProductManager, AvailableProductMixin
Expand Down Expand Up @@ -61,7 +61,7 @@ quantity, we add a relation for each delivered charge. This model then holds a t
next incoming delivery is expected. Example:

.. code-block:: python
:filename: models.py
:caption: models.py
from django.db import models
from shop.models.product import BaseProduct, BaseProductManager
Expand All @@ -87,7 +87,7 @@ Since we have a relation from the inventory to our product model, we must use an
while creating our admin backend. Example:

.. code-block:: python
:filename: admin.py
:caption: admin.py
from django.contrib import admin
from myshop.models import MyProduct, Inventory
Expand Down Expand Up @@ -137,7 +137,7 @@ Independently of the chosen approach, replace ``AvailableProductMixin`` with ``R
in the product's model declaration. Example for the simple approach:
.. code-block:: python
:filename: models.py
:caption: models.py
from shop.models.product import BaseProduct, ReserveProductMixin
Expand All @@ -148,7 +148,7 @@ Example using the related inventory model. Here we use the class ``ReserveProduc
the inventory module:

.. code-block:: python
:filename: models.py
:caption: models.py
from shop.models.product import BaseProduct
from shop.models.inventory import ReserveProductMixin
Expand Down
14 changes: 7 additions & 7 deletions docs/reference/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ elasticsearch-dsl_ together with django-elasticsearch-dsl_. It now supports up t
version of Elasticsearch, which currently is 7.6.

In this document we assume that the merchant only wants to index his products, but not any arbitrary
content, such as for example the terms and condition, as found outside **django-SHOP**, but inside
**django-CMS**. The latter would however be perfectly feasible.
content, such as for example the "Terms and Conditions" page, as found outside **django-SHOP**, but
usually inside **django-CMS**. Indexing CMS pages using Elasticsearch would be perfectly feasible,
but is not the topic of this documentation.


Configuration
-------------

Download and install the latest version of the Elasticsearch binary. During development, all tests
have been performed with version 7.5. After unzipping the file, start Elasticsearch in daemon mode:

:samp:` ./path/to/elasticsearch-{version}/bin/elasticsearch -d `
have been performed with version 7.5. After unzipping the file, start Elasticsearch in daemon mode
by invoking :samp:`./path/to/elasticsearch-{version}/bin/elasticsearch -d`.

Check if the server answers on HTTP requests. Pointing a browser on
`http://localhost:9200/ <http://localhost:9200/>`_ should return something similar to this:
Expand All @@ -47,8 +47,8 @@ Check if the server answers on HTTP requests. Pointing a browser on
"cluster_name" : "elasticsearch",
"cluster_uuid" : "P9HVZRPbUXjTEDO9iZHGDk",
"version" : {
...
},
}
}
Install ``elasticsearch-dsl`` and ``django-elasticsearch-dsl`` using
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/commodity-product.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ must contain the templatetag
{% load cms_tags %}
'' {% render_placeholder product.placeholder %}
{% render_placeholder product.placeholder %}
Here the placeholder is a special field :class:`cms.models.fields.PlaceholderField` in our Django
model ``Commodity``. It is the equivalent to the placeholder otherwise used in regular
Expand Down
1 change: 1 addition & 0 deletions docs/tutorial/polymorphic-product.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The demo provided by cookiecutter-django-shop_ using the product model "polymorp
setup a shop, with different product types. This is where polymorphism_ enters the scene. In our
example we use a combination from the simpler demos "commodity" and "smartcard".

.. _cookiecutter-django-shop: https://github.com/awesto/cookiecutter-django-shop
.. _polymorphism: https://en.wikipedia.org/wiki/Polymorphism_(computer_science)

Since in this example, we have to specialize our product out of a common base, the properties for
Expand Down

0 comments on commit 3dec198

Please sign in to comment.