You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

settings.rst 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. =======================
  2. Oscar specific settings
  3. =======================
  4. Oscar provides a number of settings used to configure the system.
  5. .. contents::
  6. :local:
  7. :depth: 1
  8. Available settings
  9. ==================
  10. OSCAR_SHOP_NAME
  11. ---------------
  12. Default: ``Oscar``
  13. The name of your e-commerce shop site.
  14. OSCAR_SHOP_TAGLINE
  15. ------------------
  16. Default: ``Domain-driven e-Commerce for Django``
  17. The tagline that is displayed next to the shop name and in the browser title
  18. OSCAR_ORDER_STATUS_PIPELINE
  19. ---------------------------
  20. The pipeline defines the statuses that an order or line item can have and what
  21. transitions are allowed in any given status. The pipeline is defined as a
  22. dictionary where the keys are the available statuses. Allowed transitions are
  23. defined as iterable values for the corresponding status. A sample pipeline
  24. (as used in the Oscar sandbox) might look like this::
  25. OSCAR_INITIAL_ORDER_STATUS = 'Pending'
  26. OSCAR_INITIAL_LINE_STATUS = 'Pending'
  27. OSCAR_ORDER_STATUS_PIPELINE = {
  28. 'Pending': ('Being processed', 'Cancelled',),
  29. 'Being processed': ('Processed', 'Cancelled',),
  30. 'Cancelled': (),
  31. }
  32. OSCAR_INITIAL_ORDER_STATUS
  33. --------------------------
  34. The initial status used when a new order is submitted. This has to be a status
  35. that is defined in the ``OSCAR_ORDER_STATUS_PIPELINE``.
  36. OSCAR_INITIAL_LINE_STATUS
  37. -------------------------
  38. The status assigned to a line item when it is created as part of an new order. It
  39. has to be a status defined in ``OSCAR_ORDER_STATUS_PIPELINE``.
  40. OSCAR_ALLOW_ANON_CHECKOUT
  41. -------------------------
  42. Default: ``False``
  43. Specifies if an anonymous user can buy products without creating an account.
  44. If set to ``False`` a registered user is required to check out.
  45. OSCAR_PARTNER_WRAPPERS
  46. ----------------------
  47. Default: ``{}``
  48. OSCAR_ALLOW_ANON_REVIEWS
  49. ------------------------
  50. Default: ``True``
  51. This setting defines whether an anonymous user can create a review for
  52. a product without registering first. If it is set to ``True`` anonymous
  53. users can create product reviews.
  54. OSCAR_MODERATE_REVIEWS
  55. ----------------------
  56. Default: ``False``
  57. This defines whether reviews have to be moderated before they are publicly
  58. available. If set to ``False`` a review created by a customer is immediately
  59. visible on the product page.
  60. OSCAR_EAGER_ALERTS
  61. ------------------
  62. Default: ``True``
  63. This enables sending alert notifications/emails instantly when products get
  64. back in stock by listening to stock record update signals this might impact
  65. performance for large numbers stock record updates.
  66. Alternatively, the management command ``oscar_send_alerts`` can be used to
  67. run periodically, e.g. as a cronjob. In this case instant alerts should be
  68. disabled.
  69. OSCAR_SEND_REGISTRATION_EMAIL
  70. -----------------------------
  71. Default: ``True``
  72. Sending out *welcome* messages to a user after they have registered on the
  73. site can be enabled or disabled using this setting. Setting it to ``True``
  74. will send out emails on registration.
  75. OSCAR_FROM_EMAIL
  76. ----------------
  77. Default: ``oscar@example.com``
  78. The email address used as the sender for all communication events and emails
  79. handled by Oscar.
  80. OSCAR_OFFER_BLACKLIST_PRODUCT
  81. -----------------------------
  82. Default: ``None``
  83. OSCAR_MAX_BASKET_QUANTITY_THRESHOLD
  84. -----------------------------------
  85. Default: ``None``
  86. OSCAR_BASKET_COOKIE_OPEN
  87. ------------------------
  88. Default: ``oscar_open_basket``
  89. OSCAR_BASKET_COOKIE_SAVED
  90. -------------------------
  91. Default: ``oscar_saved_basket``
  92. OSCAR_COOKIES_DELETE_ON_LOGOUT
  93. ------------------------------
  94. Default: ``['oscar_recently_viewed_products', ]``
  95. OSCAR_DEFAULT_CURRENCY
  96. ----------------------
  97. Default: ``GBP``
  98. This should be the symbol of the currency you wish Oscar to use by default.
  99. This will be used by the currency templatetag.
  100. OSCAR_CURRENCY_LOCALE
  101. ---------------------
  102. Default: ``None``
  103. This can be used to customise currency formatting. The value will be passed to
  104. the ``format_currency`` function from the `Babel library`_.
  105. .. _`Babel library`: http://babel.edgewall.org/wiki/ApiDocs/0.9/babel.numbers#babel.numbers:format_decimal
  106. OSCAR_CURRENCY_FORMAT
  107. ---------------------
  108. Default: ``None``
  109. This can be used to customise currency formatting. The value will be passed to
  110. the ``format_currency`` function from the Babel library.
  111. OSCAR_BASKET_COOKIE_LIFETIME
  112. ----------------------------
  113. Default: 604800 (1 week in seconds)
  114. The time to live for the basket cookie in seconds
  115. OSCAR_RECENTLY_VIEWED_PRODUCTS
  116. ------------------------------
  117. Default: 20
  118. The number of recently viewed products to store
  119. OSCAR_PRODUCTS_PER_PAGE
  120. ------------------------------
  121. Default: 20
  122. The number of products to paginate by
  123. OSCAR_SEARCH_SUGGEST_LIMIT
  124. --------------------------
  125. Default: 10
  126. The number of suggestions that the search 'suggest' function should return
  127. at maximum
  128. OSCAR_IMAGE_FOLDER
  129. ------------------
  130. Default: ``images/products/%Y/%m/``
  131. The location within the ``MEDIA_ROOT`` folder that is used to store product images.
  132. The folder name can contain date format strings as described in the `Django Docs`_.
  133. .. _`Django Docs`: https://docs.djangoproject.com/en/dev/ref/models/fields/#filefield
  134. OSCAR_PROMOTION_MERCHANDISING_BLOCK_TYPES
  135. -----------------------------------------
  136. Default::
  137. COUNTDOWN, LIST, SINGLE_PRODUCT, TABBED_BLOCK = (
  138. 'Countdown', 'List', 'SingleProduct', 'TabbedBlock')
  139. OSCAR_PROMOTION_MERCHANDISING_BLOCK_TYPES = (
  140. (COUNTDOWN, "Vertical list"),
  141. (LIST, "Horizontal list"),
  142. (TABBED_BLOCK, "Tabbed block"),
  143. (SINGLE_PRODUCT, "Single product"),
  144. )
  145. Defines the available promotion block types that can be used in Oscar.
  146. OSCAR_PROMOTION_FOLDER
  147. ----------------------
  148. Default: ``images/promotions/``
  149. The folder within ``MEDIA_ROOT`` used for uploaded promotion images.
  150. OSCAR_PROMOTION_POSITIONS
  151. -------------------------
  152. Default::
  153. OSCAR_PROMOTION_POSITIONS = (('page', 'Page'),
  154. ('right', 'Right-hand sidebar'),
  155. ('left', 'Left-hand sidebar'))
  156. The choice of display locations available when editing a promotion. Only
  157. useful when using a new set of templates.
  158. OSCAR_MISSING_IMAGE_URL
  159. -----------------------
  160. Default: ``image_not_found.jpg``
  161. Copy this image from ``oscar/static/img`` to your ``MEDIA_ROOT`` folder. It needs to
  162. be there so Sorl can resize it.
  163. OSCAR_UPLOAD_ROOT
  164. -----------------
  165. Default: ``/tmp``
  166. Deprecated settings
  167. ===================
  168. There are currently no deprecated settings in Oscar.