You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I PUT the task back, I'm met with a 400 response:
In [21]: response=requests.put(t0['links']['self'], data=t0, auth=('admin', 'admin'))
In [22]: response.textOut[22]: u'{"non_field_errors":["Backlog tasks must have \\"Not Started\\" status."]}'
I'm also a bit confused, and perhaps this is related, about the statuses as defined in the models versus in the Backbone UI:
In [27]: from board import models
In [28]: models.Task.STATUS_TODO
Out[28]: 1
Whereas when I hit up http://localhost:9000/#sprint/1, I see five statuses: Backlog, Not Started, In Development, In Testing, Completed
Also, 👍 to the suggestion from #2 that there should be a requirements.txt for each chapter. Without a careful reading of the text, one has to sort of fumble through what pip installs are needed.
"Backlog" in our model is not another status but rather denotes tasks which are not assigned to a sprint. The UI needs to display them in the sprint detail so that they can be moved into the sprint via drag and drop. In our application we've chosen to enforce that tasks which are not part of a sprint must have the status of TODO. You're seeing that enforced in the PUT call because it attempts to change the status without assigning a sprint.
So, trying to follow along with Chapter 6, I hit the API via
requests
:But when I
PUT
the task back, I'm met with a 400 response:I'm also a bit confused, and perhaps this is related, about the statuses as defined in the models versus in the Backbone UI:
Whereas when I hit up
http://localhost:9000/#sprint/1
, I see five statuses:Backlog, Not Started, In Development, In Testing, Completed
I haven't dug too far down yet, but it seems like there's a conflict in the STATUS codes:
https://github.com/lightweightdjango/examples/blob/chapter-6/scrum/board/static/board/js/views.js#L307
versus
https://github.com/lightweightdjango/examples/blob/chapter-6/scrum/board/models.py#L20
The text was updated successfully, but these errors were encountered: