Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

defaults.py 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. # Checkout
  23. OSCAR_ALLOW_ANON_CHECKOUT = False
  24. # Partners
  25. OSCAR_PARTNER_WRAPPERS = {}
  26. # Promotions
  27. COUNTDOWN, LIST, SINGLE_PRODUCT, TABBED_BLOCK = (
  28. 'Countdown', 'List', 'SingleProduct', 'TabbedBlock')
  29. OSCAR_PROMOTION_MERCHANDISING_BLOCK_TYPES = (
  30. (COUNTDOWN, "Vertical list"),
  31. (LIST, "Horizontal list"),
  32. (TABBED_BLOCK, "Tabbed block"),
  33. (SINGLE_PRODUCT, "Single product"),
  34. )
  35. # Reviews
  36. OSCAR_ALLOW_ANON_REVIEWS = True
  37. OSCAR_MODERATE_REVIEWS = False
  38. # This enables sending alert notifications/emails
  39. # instantly when products get back in stock
  40. # by listening to stock record update signals
  41. # this might impact performace for large numbers
  42. # stock record updates.
  43. # Alternatively, the management command
  44. # ``oscar_send_alerts`` can be used to
  45. # run periodically, e.g. as a cronjob. In this case
  46. # instant alerts should be disabled.
  47. OSCAR_EAGER_ALERTS = True
  48. # Registration
  49. OSCAR_SEND_REGISTRATION_EMAIL = True
  50. OSCAR_FROM_EMAIL = 'oscar@example.com'
  51. # Offers
  52. OSCAR_OFFER_BLACKLIST_PRODUCT = None
  53. # Cookies
  54. OSCAR_COOKIES_DELETE_ON_LOGOUT = ['oscar_recently_viewed_products', ]
  55. # Menu structure of the dashboard navigation
  56. OSCAR_DASHBOARD_NAVIGATION = [
  57. {
  58. 'label': _('Dashboard'),
  59. 'icon': 'icon-th-list',
  60. 'url_name': 'dashboard:index',
  61. },
  62. {
  63. 'label': _('Catalogue'),
  64. 'icon': 'icon-sitemap',
  65. 'children': [
  66. {
  67. 'label': _('Products'),
  68. 'url_name': 'dashboard:catalogue-product-list',
  69. },
  70. {
  71. 'label': _('Categories'),
  72. 'url_name': 'dashboard:catalogue-category-list',
  73. },
  74. {
  75. 'label': _('Ranges'),
  76. 'url_name': 'dashboard:range-list',
  77. },
  78. {
  79. 'label': _('Low stock alerts'),
  80. 'url_name': 'dashboard:stock-alert-list',
  81. },
  82. ]
  83. },
  84. {
  85. 'label': _('Fulfilment'),
  86. 'icon': 'icon-shopping-cart',
  87. 'children': [
  88. {
  89. 'label': _('Order management'),
  90. 'url_name': 'dashboard:order-list',
  91. },
  92. {
  93. 'label': _('Statistics'),
  94. 'url_name': 'dashboard:order-stats',
  95. },
  96. ]
  97. },
  98. {
  99. 'label': _('Customers'),
  100. 'icon': 'icon-group',
  101. 'children': [
  102. {
  103. 'label': _('Customer management'),
  104. 'url_name': 'dashboard:users-index',
  105. },
  106. {
  107. 'label': _('Stock alert requests'),
  108. 'url_name': 'dashboard:user-alert-list',
  109. },
  110. ]
  111. },
  112. {
  113. 'label': _('Offers'),
  114. 'icon': 'icon-bullhorn',
  115. 'children': [
  116. {
  117. 'label': _('Offer management'),
  118. 'url_name': 'dashboard:offer-list',
  119. },
  120. {
  121. 'label': _('Vouchers'),
  122. 'url_name': 'dashboard:voucher-list',
  123. },
  124. ],
  125. },
  126. {
  127. 'label': _('Content'),
  128. 'icon': 'icon-folder-close',
  129. 'children': [
  130. {
  131. 'label': _('Content blocks'),
  132. 'url_name': 'dashboard:promotion-list',
  133. },
  134. {
  135. 'label': _('Content blocks by page'),
  136. 'url_name': 'dashboard:promotion-list-by-page',
  137. },
  138. {
  139. 'label': _('Pages'),
  140. 'url_name': 'dashboard:page-list',
  141. },
  142. {
  143. 'label': _('Email templates'),
  144. 'url_name': 'dashboard:comms-list',
  145. },
  146. {
  147. 'label': _('Reviews'),
  148. 'url_name': 'dashboard:reviews-list',
  149. },
  150. ]
  151. },
  152. {
  153. 'label': _('Reports'),
  154. 'icon': 'icon-bar-chart',
  155. 'url_name': 'dashboard:reports-index',
  156. },
  157. ]
  158. OSCAR_SETTINGS = dict(
  159. [(k, v) for k, v in locals().items() if k.startswith('OSCAR_')])