Relative Content

Tag Archive for python-3.xdjangodjango-rest-framework

Django Error: “‘type’ object is not iterable”

i’m a Django beginner and want to write a website for my friend who works as a painter.
i wanted to write a rest-api so i can access the models in my frontend (which i didnt implement yet).
when i try to call the subdomain for a model i wrote i get the error “‘type’ object is not iterable”.
i wanted to make it possible for users that are registered to leave a feedback, so i wrote a class Feedback. I also implemented a FeedbackSerializer and a FeedbackView.
i was trying to use chatgpt but that was of no help. stackoverflow also didnt have any similar errors like the one that occured to me.

Django Error: “‘type’ object is not iterable”

i’m a Django beginner and want to write a website for my friend who works as a painter.
i wanted to write a rest-api so i can access the models in my frontend (which i didnt implement yet).
when i try to call the subdomain for a model i wrote i get the error “‘type’ object is not iterable”.
i wanted to make it possible for users that are registered to leave a feedback, so i wrote a class Feedback. I also implemented a FeedbackSerializer and a FeedbackView.
i was trying to use chatgpt but that was of no help. stackoverflow also didnt have any similar errors like the one that occured to me.

Django Error: “‘type’ object is not iterable”

i’m a Django beginner and want to write a website for my friend who works as a painter.
i wanted to write a rest-api so i can access the models in my frontend (which i didnt implement yet).
when i try to call the subdomain for a model i wrote i get the error “‘type’ object is not iterable”.
i wanted to make it possible for users that are registered to leave a feedback, so i wrote a class Feedback. I also implemented a FeedbackSerializer and a FeedbackView.
i was trying to use chatgpt but that was of no help. stackoverflow also didnt have any similar errors like the one that occured to me.

Django Rest Framework RetrieveUpdateAPIView not working

I’m having an issue with using RetrieveUpdateAPIView and RetrieveDestroyAPIView. I’m trying to Update or Delete a Newsletter object while logged in as an administrator. Unfortunately, after clicking ‘PUT’ or ‘DELETE’, it automatically logs me out and Django Rest Framework shows an error: