lightweightdjango / examples

Code examples for "Lightweight Django", by Julia Elman and Mark Lavin.
http://bit.ly/lightweightdjango
441 stars 221 forks source link

Why no TaskViews? #3

Closed gddk closed 9 years ago

gddk commented 9 years ago

Thank you for the book, I'm learning tons.

Why no TaskItemView and TaskDetailView in the examples? The second half of chapter 6 is missing.

I've built it up following the book, can see here https://github.com/djangopractice/scrum_ui. Notice I've split into two repos: scrum and scrum_ui. Thought process is: the API controls the data model and should be app agnostic - we could build many UIs, even using different languages.

Two problems:

1) I cannot Add Task. In the book you state "We now have a fully functioning Backbone application with the ability to add sprints and tasks and edit them while working with our REST API." Is this a known problem or did I miss something?

2) I cannot change the status of a task with scrum_ui. Same question: known limitation or did I miss something?

Thanks for your consideration. If these are known limitations, no biggie, the purpose is to introduce how to use Backbone views and models with Underscore to make a client side single page application. Making Add Task and change task status work is a good homework assignment to sink in the lesson.

mlavin commented 9 years ago

The README on master needs to be more clear about how to use this repo. There are branches which correspond to each chapter of the book. All of the features you discuss are present in the book. All of the code from the book is present in this repo. The Backbone views for adding and editing tasks are present on the Chapter 6-8 branches: https://github.com/lightweightdjango/examples/blob/chapter-6/scrum/board/static/board/js/views.js

Chapter 7 adds a drap and drop interface which is how the task status is updated: https://github.com/lightweightdjango/examples/blob/chapter-7/scrum/board/static/board/js/views.js#L240

juliaelman commented 9 years ago

@gddk thanks for posting this issue and making us aware of the confusion! As you can see in the commits above, we've updated masters READE file with links to each chapters example code branch. We've also removed all of the code from master to help avoid any continued confusion for other users.

Again, thank you for making us aware of this and hope you enjoy the rest of the book!

gddk commented 9 years ago

@juliaelman @mlavin thanks! I didn't realize the code I was looking for was in branches, didn't think to look there. I really like the new organization with the README pointing to the different branches. I'm very much enjoying the book. I'm only through CH6 so far, looking forward to the rest, next up web sockets with tornado :)