<commit_before>=========================
How to configure shipping
=========================

Configuring shipping is not trivial.  It generally requires creating a
'shipping' app within your project where you can define your own shipping
methods as well as a 'repository' class which determines when methods are
available.

This recipe explains in more detail how Oscar models shipping as well as the
steps involved in configuring shipping for your project.

How Oscar handles shipping charges
----------------------------------

Oscar uses a "repository" class to manage shipping charges.  The class is used
in two ways:

* _It provides a list of shipping methods available to the user._  This is used to
  generate the content for the shipping methods page of checkout, where the user
  can choose a shipping method.  The methods available generally depend on the
  user, the basket and the shipping address.

* _It allows a shipping method to be retrieved based on a identifying code._  When
  a user selects a shipping method during checkout, it is persisted in the
  session using a code.  This code is used to retrieve the chosen shipping
  method when it is required.<commit_msg>Correct Sphinx syntax in shipping docs<commit_after>=========================
How to configure shipping
=========================

Configuring shipping is not trivial.  It generally requires creating a
'shipping' app within your project where you can define your own shipping
methods as well as a 'repository' class which determines when methods are
available.

This recipe explains in more detail how Oscar models shipping as well as the
steps involved in configuring shipping for your project.

How Oscar handles shipping charges
----------------------------------

Oscar uses a "repository" class to manage shipping charges.  The class is used
in two ways:

* **It provides a list of shipping methods available to the user.**  This is used to
  generate the content for the shipping methods page of checkout, where the user
  can choose a shipping method.  The methods available generally depend on the
  user, the basket and the shipping address.

* **It allows a shipping method to be retrieved based on a identifying code.**  When
  a user selects a shipping method during checkout, it is persisted in the
  session using a code.  This code is used to retrieve the chosen shipping
  method when it is required.
{'fraction_non_alphanumeric': 0.09404910528506034, 'fraction_numerical': 0.0, 'mean_word_length': 3.8273092369477912, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6431588', 'n_tokens_mistral': 529, 'n_tokens_neox': 508, 'n_words': 354}