ob-dj-store 0.0.11.11__tar.gz → 0.0.11.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/PKG-INFO +1 -1
  2. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/stores/rest/serializers/serializers.py +13 -3
  3. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/stores/views.py +34 -1
  4. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/admin.py +5 -0
  5. ob-dj-store-0.0.11.12/ob_dj_store/core/stores/migrations/0066_auto_20230304_1532.py +64 -0
  6. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/__init__.py +6 -1
  7. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_wallet.py +29 -3
  8. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/receivers.py +2 -3
  9. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/utils/helpers.py +2 -2
  10. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/utils/utils.py +3 -1
  11. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store.egg-info/PKG-INFO +1 -1
  12. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store.egg-info/SOURCES.txt +1 -0
  13. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/.github/dependabot.yml +0 -0
  14. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/.github/workflows/docs.yml +0 -0
  15. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/.github/workflows/pre-release.yml +0 -0
  16. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/.github/workflows/release.yml +0 -0
  17. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/.github/workflows/test-build.yml +0 -0
  18. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/.gitignore +0 -0
  19. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/.isort.cfg +0 -0
  20. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/.pre-commit-config.yaml +0 -0
  21. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/Dockerfile +0 -0
  22. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/MANIFEST.in +0 -0
  23. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/Makefile +0 -0
  24. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/Pipfile +0 -0
  25. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/Pipfile.lock +0 -0
  26. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/README.md +0 -0
  27. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/config/__init__.py +0 -0
  28. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/config/settings.py +0 -0
  29. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/config/urls.py +0 -0
  30. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/config/wsgi.py +0 -0
  31. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docker-compose.env +0 -0
  32. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docker-compose.yml +0 -0
  33. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docs/Makefile +0 -0
  34. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docs/make.bat +0 -0
  35. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docs/source/admin.rst +0 -0
  36. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docs/source/conf.py +0 -0
  37. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docs/source/index.rst +0 -0
  38. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docs/source/installation.rst +0 -0
  39. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docs/source/models.rst +0 -0
  40. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/docs/source/rest_endpoints.rst +0 -0
  41. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/fixtures/initial_users.yaml +0 -0
  42. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/fixtures/stores.yaml +0 -0
  43. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/manage.py +0 -0
  44. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/__init__.py +0 -0
  45. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/__init__.py +0 -0
  46. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/stores/__init__.py +0 -0
  47. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/stores/filters.py +0 -0
  48. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/stores/urls.py +0 -0
  49. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/tap/__init__.py +0 -0
  50. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/tap/serializers.py +0 -0
  51. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/tap/urls.py +0 -0
  52. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/apis/tap/views.py +0 -0
  53. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/__init__.py +0 -0
  54. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/__init__.py +0 -0
  55. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/admin_inlines.py +0 -0
  56. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/apps.py +0 -0
  57. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/__init__.py +0 -0
  58. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/__init__.py +0 -0
  59. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/admin.py +0 -0
  60. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/apps.py +0 -0
  61. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/managers.py +0 -0
  62. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/migrations/0001_initial.py +0 -0
  63. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/migrations/0002_auto_20220815_1610.py +0 -0
  64. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/migrations/0003_auto_20220818_1938.py +0 -0
  65. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/migrations/__init__.py +0 -0
  66. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/models.py +0 -0
  67. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/gateway/tap/utils.py +0 -0
  68. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/managers.py +0 -0
  69. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0001_initial.py +0 -0
  70. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0002_auto_20220422_0205.py +0 -0
  71. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0003_openinghours.py +0 -0
  72. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0004_auto_20220422_2326.py +0 -0
  73. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0005_auto_20220425_2119.py +0 -0
  74. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0005_auto_20220427_1729.py +0 -0
  75. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0006_auto_20220428_0100.py +0 -0
  76. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0007_cart_cartitem_order_orderitem.py +0 -0
  77. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0008_order_status.py +0 -0
  78. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0009_auto_20220508_2142.py +0 -0
  79. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0010_auto_20220509_1633.py +0 -0
  80. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0011_favorite.py +0 -0
  81. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0012_auto_20220514_0633.py +0 -0
  82. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0013_auto_20220518_1539.py +0 -0
  83. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0014_auto_20220519_0018.py +0 -0
  84. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0015_inventory_inventoryoperations.py +0 -0
  85. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0016_productvariant_preparation_time.py +0 -0
  86. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0017_auto_20220524_0912.py +0 -0
  87. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0018_auto_20220524_1613.py +0 -0
  88. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0019_product_is_featured.py +0 -0
  89. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0020_orderhistory.py +0 -0
  90. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0021_auto_20220531_1849.py +0 -0
  91. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0022_order_pickup_time.py +0 -0
  92. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0023_feedback_feedbackattribute_feedbackconfig.py +0 -0
  93. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0024_auto_20220609_1552.py +0 -0
  94. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0025_productvariant_is_primary.py +0 -0
  95. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0026_auto_20220630_1913.py +0 -0
  96. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0027_auto_20220713_1759.py +0 -0
  97. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0028_phonecontact.py +0 -0
  98. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0029_auto_20220726_1750.py +0 -0
  99. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0030_category_parent.py +0 -0
  100. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0031_auto_20220811_1733.py +0 -0
  101. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0032_auto_20220812_1951.py +0 -0
  102. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0033_auto_20220815_0133.py +0 -0
  103. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0034_auto_20220815_1528.py +0 -0
  104. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0035_auto_20220818_1938.py +0 -0
  105. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0036_productattribute_is_mandatory.py +0 -0
  106. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0037_auto_20220825_1736.py +0 -0
  107. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0038_cartitem_extra_infos.py +0 -0
  108. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0039_auto_20220831_1521.py +0 -0
  109. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0040_auto_20220902_1806.py +0 -0
  110. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0041_auto_20220912_1506.py +0 -0
  111. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0042_wallet_wallettransaction.py +0 -0
  112. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0043_auto_20220919_1854.py +0 -0
  113. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0044_remove_productvariant_has_inventory.py +0 -0
  114. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0045_shippingmethod_type.py +0 -0
  115. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0046_auto_20221014_1720.py +0 -0
  116. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0047_auto_20221018_1433.py +0 -0
  117. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0048_auto_20221026_1933.py +0 -0
  118. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0049_auto_20221029_1524.py +0 -0
  119. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0050_favoriteextra.py +0 -0
  120. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0051_order_car_id.py +0 -0
  121. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0052_auto_20221129_1732.py +0 -0
  122. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0053_inventory_plu.py +0 -0
  123. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0054_auto_20221230_1501.py +0 -0
  124. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0055_store_image.py +0 -0
  125. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0056_auto_20230213_2224.py +0 -0
  126. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0057_auto_20230214_1724.py +0 -0
  127. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0058_attributechoice_is_default.py +0 -0
  128. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0059_auto_20230217_2006.py +0 -0
  129. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0060_alter_orderitem_product_variant.py +0 -0
  130. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0061_auto_20230223_1435.py +0 -0
  131. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0062_auto_20230226_2005.py +0 -0
  132. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0063_alter_store_payment_methods.py +0 -0
  133. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0064_auto_20230228_1814.py +0 -0
  134. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/0065_auto_20230228_1932.py +0 -0
  135. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/migrations/__init__.py +0 -0
  136. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_address.py +0 -0
  137. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_cart.py +0 -0
  138. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_favorite.py +0 -0
  139. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_feedback.py +0 -0
  140. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_inventory.py +0 -0
  141. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_order.py +0 -0
  142. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_payment.py +0 -0
  143. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_product.py +0 -0
  144. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/models/_store.py +0 -0
  145. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/settings_validation.py +0 -0
  146. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/core/stores/utils.py +0 -0
  147. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/utils/__init__.py +0 -0
  148. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store/utils/model.py +0 -0
  149. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store.egg-info/dependency_links.txt +0 -0
  150. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store.egg-info/requires.txt +0 -0
  151. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/ob_dj_store.egg-info/top_level.txt +0 -0
  152. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/pytest.ini +0 -0
  153. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/setup.cfg +0 -0
  154. {ob-dj-store-0.0.11.11 → ob-dj-store-0.0.11.12}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-dj-store
3
- Version: 0.0.11.11
3
+ Version: 0.0.11.12
4
4
  Summary: OBytes django application for managing ecommerce stores.
5
5
  Home-page: https://www.obytes.com/
6
6
  Author: OBytes
@@ -40,6 +40,7 @@ from ob_dj_store.core.stores.models import (
40
40
  Store,
41
41
  Tax,
42
42
  Wallet,
43
+ WalletMedia,
43
44
  WalletTransaction,
44
45
  )
45
46
  from ob_dj_store.core.stores.models._inventory import Inventory
@@ -150,6 +151,7 @@ class OrderSerializer(serializers.ModelSerializer):
150
151
  items = OrderItemSerializer(many=True, read_only=True)
151
152
  history = OrderHistorySerializer(many=True, read_only=True)
152
153
  estimated_timeline = serializers.SerializerMethodField()
154
+ store_name = serializers.SerializerMethodField()
153
155
 
154
156
  class Meta:
155
157
  model = Order
@@ -172,6 +174,7 @@ class OrderSerializer(serializers.ModelSerializer):
172
174
  "extra_infos",
173
175
  "created_at",
174
176
  "updated_at",
177
+ "store_name",
175
178
  )
176
179
  extra_kwargs = {
177
180
  "customer": {"read_only": True},
@@ -202,9 +205,11 @@ class OrderSerializer(serializers.ModelSerializer):
202
205
  timeline["ready"] = timeline["delivering"] or timeline["order_ready"]
203
206
  return timeline
204
207
 
208
+ def get_store_name(self, obj):
209
+ return obj.store.name if obj.store else None
210
+
205
211
  def to_representation(self, instance):
206
212
  data = super().to_representation(instance)
207
- data["store_name"] = instance.store.name
208
213
  return data
209
214
 
210
215
  def _get_store(self):
@@ -1064,13 +1069,18 @@ class FavoriteSerializer(serializers.ModelSerializer):
1064
1069
  return favorite
1065
1070
 
1066
1071
 
1072
+ class WalletMediaSerializer(serializers.ModelSerializer):
1073
+ class Meta:
1074
+ model = WalletMedia
1075
+ fields = "__all__"
1076
+
1077
+
1067
1078
  class WalletSerializer(serializers.ModelSerializer):
1068
1079
  class Meta:
1069
1080
  model = Wallet
1070
- fields = ["id", "user", "balance", "name", "image", "image_thumbnail_medium"]
1081
+ fields = ["id", "user", "balance", "name", "media_image", "image_url"]
1071
1082
  extra_kwargs = {
1072
1083
  "user": {"read_only": True},
1073
- "image_thumbnail_medium": {"read_only": True},
1074
1084
  }
1075
1085
 
1076
1086
 
@@ -48,6 +48,7 @@ from ob_dj_store.apis.stores.rest.serializers.serializers import (
48
48
  ShippingMethodSerializer,
49
49
  StoreSerializer,
50
50
  TaxSerializer,
51
+ WalletMediaSerializer,
51
52
  WalletSerializer,
52
53
  WalletTopUpSerializer,
53
54
  WalletTransactionSerializer,
@@ -67,6 +68,7 @@ from ob_dj_store.core.stores.models import (
67
68
  Store,
68
69
  Tax,
69
70
  Wallet,
71
+ WalletMedia,
70
72
  )
71
73
  from ob_dj_store.core.stores.models._inventory import Inventory
72
74
 
@@ -945,7 +947,9 @@ class WalletViewSet(
945
947
  ]
946
948
 
947
949
  def get_queryset(self):
948
- return Wallet.objects.filter(user=self.request.user)
950
+ return Wallet.objects.filter(user=self.request.user).select_related(
951
+ "media_image"
952
+ )
949
953
 
950
954
  @swagger_auto_schema(
951
955
  operation_summary="Get User Wallet",
@@ -1040,3 +1044,32 @@ class WalletViewSet(
1040
1044
 
1041
1045
  serializer = self.get_serializer(queryset, many=True)
1042
1046
  return Response(serializer.data)
1047
+
1048
+ @swagger_auto_schema(
1049
+ operation_summary="List Wallet selection images",
1050
+ operation_description="""
1051
+ list wallet selection images
1052
+ """,
1053
+ tags=[
1054
+ "Wallet",
1055
+ ],
1056
+ )
1057
+ @action(
1058
+ methods=[
1059
+ "GET",
1060
+ ],
1061
+ detail=False,
1062
+ url_path="images",
1063
+ serializer_class=WalletMediaSerializer,
1064
+ )
1065
+ def images(
1066
+ self, request: Request, *args: typing.Any, **kwargs: typing.Any
1067
+ ) -> Response:
1068
+ queryset = WalletMedia.objects.filter(is_active=True)
1069
+ page = self.paginate_queryset(queryset)
1070
+ if page is not None:
1071
+ serializer = self.get_serializer(page, many=True)
1072
+ return self.get_paginated_response(serializer.data)
1073
+
1074
+ serializer = self.get_serializer(queryset, many=True)
1075
+ return Response(serializer.data)
@@ -288,6 +288,10 @@ class WalletAdmin(admin.ModelAdmin):
288
288
  ]
289
289
 
290
290
 
291
+ class WalletMediaAdmin(admin.ModelAdmin):
292
+ list_display = ("id", "image", "image_thumbnail_medium", "is_active")
293
+
294
+
291
295
  admin.site.register(models.Store, StoreAdmin)
292
296
  admin.site.register(models.ShippingMethod, ShippingMethodAdmin)
293
297
  admin.site.register(models.PaymentMethod, PaymentMethodAdmin)
@@ -305,3 +309,4 @@ admin.site.register(models.Inventory, InventoryAdmin)
305
309
  admin.site.register(models.Tax, TaxAdmin)
306
310
  admin.site.register(models.WalletTransaction, WalletTransactionAdmin)
307
311
  admin.site.register(models.Wallet, WalletAdmin)
312
+ admin.site.register(models.WalletMedia, WalletMediaAdmin)
@@ -0,0 +1,64 @@
1
+ # Generated by Django 3.2.8 on 2023-03-04 12:32
2
+
3
+ import django.db.models.deletion
4
+ from django.db import migrations, models
5
+
6
+ import ob_dj_store.utils.helpers
7
+ import ob_dj_store.utils.model
8
+
9
+
10
+ class Migration(migrations.Migration):
11
+
12
+ dependencies = [
13
+ ("stores", "0065_auto_20230228_1932"),
14
+ ]
15
+
16
+ operations = [
17
+ migrations.CreateModel(
18
+ name="WalletMedia",
19
+ fields=[
20
+ (
21
+ "id",
22
+ models.AutoField(
23
+ auto_created=True,
24
+ primary_key=True,
25
+ serialize=False,
26
+ verbose_name="ID",
27
+ ),
28
+ ),
29
+ (
30
+ "image",
31
+ models.ImageField(
32
+ upload_to=ob_dj_store.utils.helpers.wallet_media_upload_to
33
+ ),
34
+ ),
35
+ (
36
+ "image_thumbnail_medium",
37
+ models.ImageField(blank=True, null=True, upload_to="wallets/"),
38
+ ),
39
+ ("is_active", models.BooleanField(default=True)),
40
+ ("created_at", models.DateTimeField(auto_now_add=True)),
41
+ ("updated_at", models.DateTimeField(auto_now=True)),
42
+ ],
43
+ bases=(ob_dj_store.utils.model.DjangoModelCleanMixin, models.Model),
44
+ ),
45
+ migrations.RemoveField(
46
+ model_name="wallet",
47
+ name="image",
48
+ ),
49
+ migrations.RemoveField(
50
+ model_name="wallet",
51
+ name="image_thumbnail_medium",
52
+ ),
53
+ migrations.AddField(
54
+ model_name="wallet",
55
+ name="media_image",
56
+ field=models.ForeignKey(
57
+ blank=True,
58
+ null=True,
59
+ on_delete=django.db.models.deletion.SET_NULL,
60
+ related_name="wallets",
61
+ to="stores.walletmedia",
62
+ ),
63
+ ),
64
+ ]
@@ -26,7 +26,11 @@ from ob_dj_store.core.stores.models._store import (
26
26
  ShippingMethod,
27
27
  Store,
28
28
  )
29
- from ob_dj_store.core.stores.models._wallet import Wallet, WalletTransaction
29
+ from ob_dj_store.core.stores.models._wallet import (
30
+ Wallet,
31
+ WalletMedia,
32
+ WalletTransaction,
33
+ )
30
34
 
31
35
  __all__ = [
32
36
  "Store",
@@ -60,4 +64,5 @@ __all__ = [
60
64
  "WalletTransaction",
61
65
  "Wallet",
62
66
  "FavoriteExtra",
67
+ "WalletMedia",
63
68
  ]
@@ -11,10 +11,27 @@ from ob_dj_store.core.stores.managers import WalletTransactionManager
11
11
  from ob_dj_store.core.stores.models._store import PaymentMethod
12
12
  from ob_dj_store.core.stores.utils import validate_currency
13
13
  from ob_dj_store.utils.helpers import wallet_media_upload_to
14
+ from ob_dj_store.utils.model import DjangoModelCleanMixin
14
15
 
15
16
  logger = logging.getLogger(__name__)
16
17
 
17
18
 
19
+ class WalletMedia(DjangoModelCleanMixin, models.Model):
20
+ """
21
+ selection images for wallets.
22
+ """
23
+
24
+ image = models.ImageField(upload_to=wallet_media_upload_to)
25
+ image_thumbnail_medium = models.ImageField(
26
+ upload_to="wallets/", null=True, blank=True
27
+ )
28
+ is_active = models.BooleanField(default=True)
29
+
30
+ # Audit fields
31
+ created_at = models.DateTimeField(auto_now_add=True)
32
+ updated_at = models.DateTimeField(auto_now=True)
33
+
34
+
18
35
  class Wallet(models.Model):
19
36
  user = models.ForeignKey(
20
37
  settings.AUTH_USER_MODEL,
@@ -22,9 +39,12 @@ class Wallet(models.Model):
22
39
  related_name="wallets",
23
40
  )
24
41
  name = models.CharField(max_length=200, null=True, blank=True)
25
- image = models.ImageField(upload_to=wallet_media_upload_to, null=True, blank=True)
26
- image_thumbnail_medium = models.ImageField(
27
- upload_to="wallets/", null=True, blank=True
42
+ media_image = models.ForeignKey(
43
+ WalletMedia,
44
+ on_delete=models.SET_NULL,
45
+ null=True,
46
+ blank=True,
47
+ related_name="wallets",
28
48
  )
29
49
  currency = models.CharField(
30
50
  max_length=3,
@@ -63,6 +83,12 @@ class Wallet(models.Model):
63
83
  )
64
84
  return query["balance"]
65
85
 
86
+ @property
87
+ def image_url(self):
88
+ if self.media_image:
89
+ image = self.media_image.image_thumbnail_medium
90
+ return image.url if image else None
91
+
66
92
  def top_up_wallet(self, amount: Decimal, payment_method: PaymentMethod):
67
93
  from ob_dj_store.core.stores.models import Order, Payment
68
94
 
@@ -9,7 +9,7 @@ from ob_dj_store.core.stores.models import (
9
9
  Order,
10
10
  OrderHistory,
11
11
  ProductMedia,
12
- Wallet,
12
+ WalletMedia,
13
13
  )
14
14
  from ob_dj_store.utils.utils import resize_image
15
15
 
@@ -95,7 +95,7 @@ def create_product_media_thumbnails(sender, instance, **kwargs):
95
95
 
96
96
  @receiver(
97
97
  pre_save,
98
- sender=Wallet,
98
+ sender=WalletMedia,
99
99
  dispatch_uid="create_wallet_thumbnails",
100
100
  )
101
101
  def create_wallet_thumbnails(sender, instance, **kwargs):
@@ -105,5 +105,4 @@ def create_wallet_thumbnails(sender, instance, **kwargs):
105
105
  instance.image,
106
106
  dim=medium_dim,
107
107
  size_name="medium",
108
- image_name=f"{instance.currency}_{instance.user.username}",
109
108
  )
@@ -35,6 +35,6 @@ def store_media_upload_to(instance, filename):
35
35
 
36
36
 
37
37
  def wallet_media_upload_to(instance, filename):
38
- ext = filename.split(".")[-1]
38
+ image_name, ext = filename.split(".")
39
39
  if instance:
40
- return f"wallets/{instance.currency}_{instance.user.username}_{int(now().timestamp())}.{ext}"
40
+ return f"wallets/{image_name}_{int(now().timestamp())}.{ext}"
@@ -10,7 +10,7 @@ from pilkit.processors import ResizeToFill
10
10
  logger = logging.getLogger(__name__)
11
11
 
12
12
 
13
- def resize_image(image, dim: dict, size_name: str, image_name: str):
13
+ def resize_image(image, dim: dict, size_name: str, image_name: str = None):
14
14
  try:
15
15
  img = Image.open(image)
16
16
  except UnidentifiedImageError as e:
@@ -32,6 +32,8 @@ def resize_image(image, dim: dict, size_name: str, image_name: str):
32
32
  new_img = new_img.convert("RGB")
33
33
  new_img.save(output, format=img_format, quality=70)
34
34
  output.seek(0)
35
+ if not image_name:
36
+ image_name = filename
35
37
  new_image = InMemoryUploadedFile(
36
38
  output,
37
39
  "ImageField",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-dj-store
3
- Version: 0.0.11.11
3
+ Version: 0.0.11.12
4
4
  Summary: OBytes django application for managing ecommerce stores.
5
5
  Home-page: https://www.obytes.com/
6
6
  Author: OBytes
@@ -134,6 +134,7 @@ ob_dj_store/core/stores/migrations/0062_auto_20230226_2005.py
134
134
  ob_dj_store/core/stores/migrations/0063_alter_store_payment_methods.py
135
135
  ob_dj_store/core/stores/migrations/0064_auto_20230228_1814.py
136
136
  ob_dj_store/core/stores/migrations/0065_auto_20230228_1932.py
137
+ ob_dj_store/core/stores/migrations/0066_auto_20230304_1532.py
137
138
  ob_dj_store/core/stores/migrations/__init__.py
138
139
  ob_dj_store/core/stores/models/__init__.py
139
140
  ob_dj_store/core/stores/models/_address.py
File without changes