Closed dawidp closed 9 years ago
I think I've found the problem(s): I was using following versions of Django and Django Rest Framework:
Django==1.7.1
djangorestframework==3.0.1
while these examples were build (probably) using:
Django==1.7
djangorestframework==2.4.4
I think it would be good idea to add requirements.txt
with versions of the packages
You are correct. The book was written for Django Rest Framework 2.X and isn't compatible with the latest serializer changes in 3.X. We'll update to make that more explicit.
Great book by the way, @dawidp and @mlavin, tank you for clearing this out for me...;-D
Thank you so much guys.... :+1:
ditto the thank you, I've been enjoying coding the examples and learning rest_framework. I too ran into the 3 vs 2 problem with validation, but figured out how to convert to v3 style. See https://github.com/djangopractice/scrum/blob/17c3b8b2850aa7d8aa1d3fecd38f0b654dfa2744/board/serializers.py for rest framework v3 style validation.
@juliaelman and I have been trying to figure out the best way to address this, particularly for those who have print copies of the book. We want to keep this repo in line with the book and any submitted corrections so we can't just fix it here. There are a bunch of little changes which aren't too difficult to follow if you read the 3.0 release notes but might be tedious in the errata. The easiest correction/errata would be to say pip install djangorestframework<3.0
in the chapter but that feels like a bit of a cop out. If anyone has thoughts or feelings about a note/correction that would save people some heart ache when working through this chapter we'd love to hear them.
We've pushed updates and confirmed the errata for the known issues related to Django REST Framework 3.0.X: https://github.com/lightweightdjango/examples/compare/396eb56e96...bbf88e2076
Thank you to everyone who reported this issue and those who submitted fixes. I know it was helpful for our readers to be able to find those before we were able to make the updates.
After fixing error:
in class SprintSerializer and TaskSerializer with links, status_display fields I got stuck with this error:
this happens when I try to post a sprint with due date set to 01/12/2014. Firstly I thought this was my type error but after cloning examples got the same error.