dinoperovic / django-salesman

Headless e-commerce framework for Django and Wagtail.
https://django-salesman.rtfd.io
BSD 3-Clause "New" or "Revised" License
391 stars 48 forks source link

Add order model example to docs #37

Closed pbadeer closed 1 month ago

pbadeer commented 9 months ago

Currently the "Checkout and Payment" documentation page has an example payment.py that does not work if you follow the guide, because the guide never has you set up the custom Order model that it's using behind the scenes.

Thank you for contributing to Salesman, before you continue make sure that:

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.17%. Comparing base (8105e84) to head (32a3e3b). Report is 6 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #37 +/- ## ======================================= Coverage 98.17% 98.17% ======================================= Files 49 49 Lines 2032 2032 ======================================= Hits 1995 1995 Misses 37 37 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pbadeer commented 9 months ago

I saw where the orders.py file was being surfaced in the docs and I've corrected my documentation changes to reference your existing pattern of using swappable models.

dinoperovic commented 1 month ago

Hi @pbadeer, thanks but I dont thinks this should be added in the "Checkout and payment" section, as it relates to setting up the projects. This is why its mentioned in the "Installation" section instead.

Setting up of custom swappable models is optional, so I would not write it as a required step here, the example payment.py should instead not assume swappable model is used.

I will update the advance.py example file to not assume that.