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

Exercises should have always a solution as a code to view on GitHub #6

Closed piotrsynowiec closed 5 years ago

piotrsynowiec commented 5 years ago

Most of the exercises are explained or provided as a code in GitHub, but this one cracked my mind recently:

“Class Based View Exercises Go through the Django Documentation and study how to create Class-Based Views. Update the Rango application to use Class-Based Views. Tweet how awesome you are and let us know @tangowithdjango.”

I have updated a RestrictedView, AddCategoryView etc. but I am trying to solve this one third day in a row and I'm stuck finding a solution for making function based show_category into Class Based Category View. I don't know if I should use DetailView, ListView, or FormView (due to the search functionality within Category page).

Books should have exercises and the solutions for them. This one seems like a big challange and I was surprised that in the GitHub code there's no solution to this exercise.

maxwelld90 commented 5 years ago

Hi Piotr, I agree with this. This was a bit sloppy on our part. This issue has now been fixed, and is available on our new sample solution GitHub. Have a look over there; everything that we ask you to do in the book is now implemented on there.

Cheers, David