tango_with_django_2 icon indicating copy to clipboard operation
tango_with_django_2 copied to clipboard

Creating a Suggest Category View - problems with the code

Open piotrsynowiec opened this issue 5 years ago • 1 comments

In the recent version of the book the code for this functionality doesn't include the last return line (which is visible in the code on github):

return render(request, 'rango/cats.html', {'cats': cat_list })

https://www.dropbox.com/s/5bkjot0uznns7q1/Screenshot%202019-07-12%2022.10.20.png?dl=0

Furthermore, for some reasons this functionality only works on Chrome (I have not tested the other browsers), but doesn't work on Safari (newest MacOS with all the updates). The request is not visible in the console, when searching for a category on Safari, whereas it is when doing the same on Chrome.

Safari: https://www.dropbox.com/s/66ewaz15t7n8pjf/Screenshot%202019-07-12%2022.15.11.png?dl=0

Chrome: https://www.dropbox.com/s/rbj7guln05it92s/Screenshot%202019-07-12%2022.15.43.png?dl=0

piotrsynowiec avatar Jul 12 '19 20:07 piotrsynowiec

Hi Piotr, Thanks for reporting this. As I went through the exercises, I actually did notice there was a view that was missing areturn. If possible, could you check the new version and have a look to see if the return is now in there? It should be, but it would be great to get a sanity check on this.

Appreciate you reporting it. David

maxwelld90 avatar Jul 25 '19 20:07 maxwelld90