Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fixed malformed money architecture docs + added `DEFAULT_CURRENCY` and `DEFAULT_COUNTRY` to the settings keys

NyanKiyoshi3089d91ee35b
diff --git a/docs/architecture/money.rst b/docs/architecture/money.rst
index 99ab3492eb..814621bb85 100644
--- a/docs/architecture/money.rst
+++ b/docs/architecture/money.rst
@@ -1,3 +1,6 @@
+.. _money_architecture:
+
+
Handling Money Amounts
======================
@@ -7,7 +10,7 @@ Saleor uses the `Prices <https://github.com/mirumee/prices/>`_ and `django-price
Default currency
----------------
-All prices are entered and stored in a single default currency controlled by the [DEFAULT_CURRENCY setting]. Saleor can display prices in a user's local currency (see [Open Exchange Rates integration]) but all purchases are charged in the default currency.
+All prices are entered and stored in a single default currency controlled by the :ref:`DEFAULT_CURRENCY <settings_configuration>` settings key. Saleor can display prices in a user's local currency (see :ref:`openexchangerates`) but all purchases are charged in the default currency.
.. warning::
@@ -19,7 +22,12 @@ Money and TaxedMoney
In Saleor's codebase, money amounts exist either as `Money` or `TaxedMoney` instances.
-`Money` is a type representing amount of money in specific currency: 100 USD is represented by `Money(100, 'USD')`. This type doesn't hold any additional information useful for commerce but, unlike `Decimal`, it implements safeguards and checks for calculations and comparisions of monetary values. Money amounts are stored on model using `MoneyField` that provides its own safechecks on currency and precision of stored amount. If you ever need to get to the `Decimal` of your `Money` object, you'll find it on the `amount` property.
+`Money` is a type representing amount of money in specific currency: 100 USD is represented by `Money(100, 'USD')`.
+This type doesn't hold any additional information useful for commerce but, unlike `Decimal`, it implements safeguards and checks for calculations and comparisons of monetary values.
+
+Money amounts are stored on model using `MoneyField` that provides its own safechecks on currency and precision of stored amount.
+
+If you ever need to get to the `Decimal` of your `Money` object, you'll find it on the `amount` property.
Products and shipping methods prices are stored using `MoneyField`. All prices displayed in dashboard, excluding orders, are as they have been entered in the forms. You can decide if those prices are treated as gross or net in dashboard ``Taxes`` tab.
@@ -29,4 +37,7 @@ Prices displayed in orders are gross or net depending on setting how prices are
TaxedMoneyRange
---------------
-Sometimes a product may be available under more than single price due to it's variants defining custom prices different from base brice. For such situations `Product` defines additional `get_price_range` method that return `TaxedMoneyRange` object defining minimum and maximum prices on its `start` and `stop` attributes. This object is then used by the UI to differentiate between displaying price as "10 USD" or "from 10 USD" in case of products where prices differ between variants.
+Sometimes a product may be available under more than single price due to it's variants defining custom prices different from base brice.
+
+For such situations `Product` defines additional `get_price_range` method that return `TaxedMoneyRange` object defining minimum and maximum prices on its `start` and `stop` attributes.
+This object is then used by the UI to differentiate between displaying price as "10 USD" or "from 10 USD" in case of products where prices differ between variants.
diff --git a/docs/gettingstarted/configuration.rst b/docs/gettingstarted/configuration.rst
index b28ab37815..e599d4fdc2 100644
--- a/docs/gettingstarted/configuration.rst
+++ b/docs/gettingstarted/configuration.rst
@@ -1,3 +1,5 @@
+.. _settings_configuration:
+
Configuration
=============
@@ -66,3 +68,9 @@ Environment variables
.. code-block:: console
$ python manage.py get_vat_rates
+
+``DEFAULT_CURRENCY``
+ Controls all prices entered and stored in the store as this single default currency (for more information, see :ref:`money_architecture`).
+
+``DEFAULT_COUNTRY``
+ Sets the default country for the store. It controls the default VAT to be shown if required, the default shipping country, etc.