Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

settings.rst 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. =======================
  2. Oscar specific settings
  3. =======================
  4. Oscar provides a number of configurable settings used to confugre 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 pipline defines the statuses that an order or line item can have and what
  21. transitions are allowed in any given status. The pipline 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 pipline
  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_PROMOTION_MERCHANDISING_BLOCK_TYPES
  49. -----------------------------------------
  50. Default::
  51. COUNTDOWN, LIST, SINGLE_PRODUCT, TABBED_BLOCK = (
  52. 'Countdown', 'List', 'SingleProduct', 'TabbedBlock')
  53. OSCAR_PROMOTION_MERCHANDISING_BLOCK_TYPES = (
  54. (COUNTDOWN, "Vertical list"),
  55. (LIST, "Horizontal list"),
  56. (TABBED_BLOCK, "Tabbed block"),
  57. (SINGLE_PRODUCT, "Single product"),
  58. )
  59. Defines the available promotion block types that can be used in Oscar.
  60. OSCAR_ALLOW_ANON_REVIEWS
  61. ------------------------
  62. Default: ``True``
  63. This setting defines whether an anonymous user can create a review for
  64. a product without registering first. If it is set to ``True`` anonymous
  65. users can create product reviews.
  66. OSCAR_MODERATE_REVIEWS
  67. ----------------------
  68. Default: ``False``
  69. This defines whether reviews have to be moderated before they are publicly
  70. available. If set to ``False`` a review created by a customer is immediately
  71. visible on the product page.
  72. OSCAR_EAGER_ALERTS
  73. ------------------
  74. Default: ``True``
  75. This enables sending alert notifications/emails instantly when products get
  76. back in stock by listening to stock record update signals this might impact
  77. performace for large numbers stock record updates.
  78. Alternatively, the management command ``oscar_send_alerts`` can be used to
  79. run periodically, e.g. as a cronjob. In this case instant alerts should be
  80. disabled.
  81. OSCAR_SEND_REGISTRATION_EMAIL
  82. -----------------------------
  83. Default: ``True``
  84. Sending out *welcome* messages to a user after they have registered on the
  85. site can be enabled or disabled using this setting. Setting it to ``True``
  86. will send out emails on registration.
  87. OSCAR_FROM_EMAIL
  88. ----------------
  89. Default: ``oscar@example.com``
  90. The email address used as the sender for all communication events and emails
  91. handled by Oscar.
  92. OSCAR_OFFER_BLACKLIST_PRODUCT
  93. -----------------------------
  94. Default: ``None``
  95. OSCAR_MAX_BASKET_QUANTITY_THRESHOLD
  96. -----------------------------------
  97. Default: ``None``
  98. OSCAR_BASKET_COOKIE_OPEN
  99. ------------------------
  100. Default: ``oscar_open_basket``
  101. OSCAR_BASKET_COOKIE_SAVED
  102. -------------------------
  103. Default: ``oscar_saved_basket``
  104. OSCAR_COOKIES_DELETE_ON_LOGOUT
  105. ------------------------------
  106. Default: ``['oscar_recently_viewed_products', ]``
  107. OSCAR_DEFAULT_CURRENCY
  108. ----------------------
  109. Default: ``GBP``
  110. This should be the symbol of the currency you wish Oscar to use by default.
  111. This will be used by the currency templatetag.
  112. OSCAR_CURRENCY_LOCALE
  113. ---------------------
  114. Default: ``None``
  115. This can be used to customise currency formatting. The value will be passed to
  116. the ``format_currency`` function from the `Babel library`_.
  117. .. _`Babel library`: http://babel.edgewall.org/wiki/ApiDocs/0.9/babel.numbers#babel.numbers:format_decimal
  118. OSCAR_CURRENCY_FORMAT
  119. ---------------------
  120. Default: ``None``
  121. This can be used to customise currency formatting. The value will be passed to
  122. the ``format_currency`` function from the Babel library.
  123. OSCAR_BASKET_COOKIE_LIFETIME
  124. ----------------------------
  125. Default: 604800 (1 week in seconds)
  126. The time to live for the basket cookie in seconds
  127. OSCAR_IMAGE_FOLDER
  128. ------------------
  129. Default: ``images/products/%Y/%m/``
  130. The path for uploading images to.
  131. OSCAR_RECENTLY_VIEWED_PRODUCTS
  132. ------------------------------
  133. Default: 20
  134. The number of recently viewed products to store
  135. OSCAR_SEARCH_SUGGEST_LIMIT
  136. --------------------------
  137. Default: 10
  138. The number of suggestions that the search 'suggest' function should return
  139. at maximum
  140. OSCAR_IMAGE_FOLDER
  141. ------------------
  142. Default: ``images/products/%Y/%m/``
  143. The location within the ``MEDIA_ROOT`` folder that is used to store product images.
  144. The folder name can contain date format strings as described in the `Django Docs`_.
  145. .. _`Django Docs`: https://docs.djangoproject.com/en/dev/ref/models/fields/#filefield
  146. OSCAR_PROMOTION_FOLDER
  147. ----------------------
  148. Default: ``images/promotions/``
  149. The folder within ``MEDIA_ROOT`` used for uploaded promotion images.
  150. OSCAR_MISSING_IMAGE_URL
  151. -----------------------
  152. Default: ``image_not_found.jpg``
  153. Copy this image from oscar/static/img to your MEDIA_ROOT folder. It needs to
  154. be there so Sorl can resize it.
  155. OSCAR_UPLOAD_ROOT
  156. -----------------
  157. Default: ``/tmp``
  158. Deprecated settings
  159. ===================
  160. There are currently no deprecated settings in oscar