Apress / practical-django2-and-channels2

Source Code for 'Practical Django 2 and Channels 2' by Federico Marani
Other
91 stars 54 forks source link

basket #11

Open Spartak-Belov-Floresku opened 5 years ago

Spartak-Belov-Floresku commented 5 years ago

Guys, there is an incomplete code for middlewares.py. It collapses all app for a customer, during a testing. I added extra code for the file and now it works. You can find the fixed code here, hope it is going to be a helpful for you.

Spartak-Belov-Floresku commented 5 years ago

I have a new update for you guys. Because, I added extra code to the middlewares.py on the row #16. I wrote "del request.session['basket_id']". Now, to avoid a crash of the app we need to remove the same directive from the file views.py on the row #199 or you can use "try - except" block there. Guys, why do you not use "try - except" blocks in the app during critical requests like HTTP or DB? It is going to help us to reduce crash of the app and give us ability to see a more useful information by using messages app.

aadurham commented 4 years ago

Thanks for all the hard work, which should have been done by the author at the first place! By the way, the author is of no help