I reached this part of The Ultimate Django Series: Part 2 and could not find the way to solve the excercise by myself, when looking for Mosh’s solution I can’t find how the “GET” for carts was implemented.
Am I missing something?
Where can I find the code?
Thank you for your time!
Regards
Ariel
Hello again,
I found my error. It was just a misunderstanding of the proposed excercise.
I was trying to get my cart using a URL like …/carts?=‘cart-uuid’ and that invokes get from CartViewSet which was intendedly NOT implemented.
After careful revision of URLS on the video, using the URL as requested by Mosh could make it work …/carts/‘cart-uuid’
Hope this helps anyone there in the future if stumbled like me.
Cheers!
Ariel
hello, I have this problem too, and a still not figure out how can i resolve it, i sent the same request like Mosh did , …/carts/‘cart-uuid , but i still have the same issue “Page not found (404)”,means the GET method is not implemented !!!
any help plz…!!
Hello @Zouhair
I cannot figure out whats happening there without a little help from your side.
1 - could you please attach a screen capture?
2 - could you please share the code you implemented in your models and serializers files?
Thanks for yout time.
Regards
Ariel
I also have the same problem, I can’t get the cart instance page.
Although I write the right url pattern, I’ve searched alot but I couldn’t find the solution
Hello @isra I cannot figure out whats happening there without a little help from your side.
1 - could you please attach a screen capture?
2 - could you please share the code you implemented in your models and serializers files?
3 - perhaps @Zouhair could also share his/her solution
Thanks for yout time.
Regards
Ariel
Edit I’ve solved my bug, I didn’t add (RetrieveModelMixin) to the cart view set so make sure you add this model to the cart view set , see 8:30 of the lesson 5 getting card
Thank you so much @ariel.robaldo I appreciate your reply.