Ramin-RX7 / CafeMenu

Café management website with custom dashboard panel for staff
MIT License
2 stars 4 forks source link

Implement the POST method for `cart` view #67

Closed Ramin-RX7 closed 1 year ago

Ramin-RX7 commented 1 year ago

For the cart view in orders app, implement POST method.

When using POST, data of the food id and quantity will be sent with request. Take them from the request and add them to the cookie associated with cart named cart. (Do not forget to get the cookie at first, then use eval function on it. then add the food id as the key and quntity as the value to this dict. then again make it a string and set this string as the cookie for cart).

Then after all of these, redirect them to the menu url.

Ramin-RX7 commented 1 year ago

completed in #89