tangowithcode / tango_with_django_2

Django 2 and Python 3: Tango With Django 2 Book Repository
Apache License 2.0
68 stars 23 forks source link

Creating a Suggest Category View - problems with the code #8

Open piotrsynowiec opened 5 years ago

piotrsynowiec commented 5 years ago

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

maxwelld90 commented 5 years ago

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