Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PATCH endpoint for basket item "extra" data #45

Open
thenewguy opened this issue Apr 23, 2024 · 0 comments
Open

Add PATCH endpoint for basket item "extra" data #45

thenewguy opened this issue Apr 23, 2024 · 0 comments

Comments

@thenewguy
Copy link

It would be helpful if there was an endpoint one could use to patch extra key values like:

<form 
    hx-patch="{% endverbatim %}{% url 'salesman-basket-list' %}{% verbatim %}{{ ref }}/"
    hx-swap="none"
>
    <input type="number" name="unit_price_override" value="{{ unit_price }}" min="0" step="0.01">
    <button type="submit" class="btn btn-primary" data-bs-dismiss="modal">Submit</button>
</form>

The result of submitting the form should be that the unit_price_override key in the basket item extra dict is set to the submitted value without modifying the other keys of the extra data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant