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.

defaults.py 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. from django.utils.translation import ugettext_lazy as _
  2. OSCAR_SHOP_NAME = 'Oscar'
  3. OSCAR_SHOP_TAGLINE = 'Domain-driven e-Commerce for Django'
  4. # Basket settings
  5. OSCAR_BASKET_COOKIE_LIFETIME = 7 * 24 * 60 * 60
  6. OSCAR_BASKET_COOKIE_OPEN = 'oscar_open_basket'
  7. OSCAR_BASKET_COOKIE_SAVED = 'oscar_saved_basket'
  8. OSCAR_MAX_BASKET_QUANTITY_THRESHOLD = 10000
  9. # Currency
  10. OSCAR_DEFAULT_CURRENCY = 'GBP'
  11. # Max number of products to keep on the user's history
  12. OSCAR_RECENTLY_VIEWED_PRODUCTS = 20
  13. # Paths
  14. OSCAR_IMAGE_FOLDER = 'images/products/%Y/%m/'
  15. OSCAR_PROMOTION_FOLDER = 'images/promotions/'
  16. # Copy this image from oscar/static/img to your MEDIA_ROOT folder.
  17. # It needs to be there so Sorl can resize it.
  18. OSCAR_MISSING_IMAGE_URL = 'image_not_found.jpg'
  19. OSCAR_UPLOAD_ROOT = '/tmp'
  20. # Search settings
  21. OSCAR_SEARCH_SUGGEST_LIMIT = 10
  22. # Product list settings
  23. OSCAR_PRODUCTS_PER_PAGE = 20
  24. # Checkout
  25. OSCAR_ALLOW_ANON_CHECKOUT = False
  26. # Partners
  27. OSCAR_PARTNER_WRAPPERS = {}
  28. # Promotions
  29. COUNTDOWN, LIST, SINGLE_PRODUCT, TABBED_BLOCK = (
  30. 'Countdown', 'List', 'SingleProduct', 'TabbedBlock')
  31. OSCAR_PROMOTION_MERCHANDISING_BLOCK_TYPES = (
  32. (COUNTDOWN, "Vertical list"),
  33. (LIST, "Horizontal list"),
  34. (TABBED_BLOCK, "Tabbed block"),
  35. (SINGLE_PRODUCT, "Single product"),
  36. )
  37. OSCAR_PROMOTION_POSITIONS = (('page', 'Page'),
  38. ('right', 'Right-hand sidebar'),
  39. ('left', 'Left-hand sidebar'))
  40. # Reviews
  41. OSCAR_ALLOW_ANON_REVIEWS = True
  42. OSCAR_MODERATE_REVIEWS = False
  43. # This enables sending alert notifications/emails
  44. # instantly when products get back in stock
  45. # by listening to stock record update signals
  46. # this might impact performace for large numbers
  47. # stock record updates.
  48. # Alternatively, the management command
  49. # ``oscar_send_alerts`` can be used to
  50. # run periodically, e.g. as a cronjob. In this case
  51. # instant alerts should be disabled.
  52. OSCAR_EAGER_ALERTS = True
  53. # Registration
  54. OSCAR_SEND_REGISTRATION_EMAIL = True
  55. OSCAR_FROM_EMAIL = 'oscar@example.com'
  56. # Offers
  57. OSCAR_OFFER_BLACKLIST_PRODUCT = None
  58. # Cookies
  59. OSCAR_COOKIES_DELETE_ON_LOGOUT = ['oscar_recently_viewed_products', ]
  60. # Menu structure of the dashboard navigation
  61. OSCAR_DASHBOARD_NAVIGATION = [
  62. {
  63. 'label': _('Dashboard'),
  64. 'icon': 'icon-th-list',
  65. 'url_name': 'dashboard:index',
  66. },
  67. {
  68. 'label': _('Catalogue'),
  69. 'icon': 'icon-sitemap',
  70. 'children': [
  71. {
  72. 'label': _('Products'),
  73. 'url_name': 'dashboard:catalogue-product-list',
  74. },
  75. {
  76. 'label': _('Categories'),
  77. 'url_name': 'dashboard:catalogue-category-list',
  78. },
  79. {
  80. 'label': _('Ranges'),
  81. 'url_name': 'dashboard:range-list',
  82. },
  83. {
  84. 'label': _('Low stock alerts'),
  85. 'url_name': 'dashboard:stock-alert-list',
  86. },
  87. ]
  88. },
  89. {
  90. 'label': _('Fulfilment'),
  91. 'icon': 'icon-shopping-cart',
  92. 'children': [
  93. {
  94. 'label': _('Order management'),
  95. 'url_name': 'dashboard:order-list',
  96. },
  97. {
  98. 'label': _('Statistics'),
  99. 'url_name': 'dashboard:order-stats',
  100. },
  101. ]
  102. },
  103. {
  104. 'label': _('Customers'),
  105. 'icon': 'icon-group',
  106. 'children': [
  107. {
  108. 'label': _('Customer management'),
  109. 'url_name': 'dashboard:users-index',
  110. },
  111. {
  112. 'label': _('Stock alert requests'),
  113. 'url_name': 'dashboard:user-alert-list',
  114. },
  115. ]
  116. },
  117. {
  118. 'label': _('Offers'),
  119. 'icon': 'icon-bullhorn',
  120. 'children': [
  121. {
  122. 'label': _('Offer management'),
  123. 'url_name': 'dashboard:offer-list',
  124. },
  125. {
  126. 'label': _('Vouchers'),
  127. 'url_name': 'dashboard:voucher-list',
  128. },
  129. ],
  130. },
  131. {
  132. 'label': _('Content'),
  133. 'icon': 'icon-folder-close',
  134. 'children': [
  135. {
  136. 'label': _('Content blocks'),
  137. 'url_name': 'dashboard:promotion-list',
  138. },
  139. {
  140. 'label': _('Content blocks by page'),
  141. 'url_name': 'dashboard:promotion-list-by-page',
  142. },
  143. {
  144. 'label': _('Pages'),
  145. 'url_name': 'dashboard:page-list',
  146. },
  147. {
  148. 'label': _('Email templates'),
  149. 'url_name': 'dashboard:comms-list',
  150. },
  151. {
  152. 'label': _('Reviews'),
  153. 'url_name': 'dashboard:reviews-list',
  154. },
  155. ]
  156. },
  157. {
  158. 'label': _('Reports'),
  159. 'icon': 'icon-bar-chart',
  160. 'url_name': 'dashboard:reports-index',
  161. },
  162. ]
  163. OSCAR_SETTINGS = dict(
  164. [(k, v) for k, v in locals().items() if k.startswith('OSCAR_')])