REST_framework AttributeAttribute error when attempting to get a value for fieldDjango Rest Framework - Nested Serialization not working as expectedGetting attribute error when trying to access the nested serializer in Django Rest FrameworkAttribute Error after adding many=True in restframework django?Django AttributeError:'Campaign' object has no attribute 'ads'creating two models in one serializer of django rest frameworkDjango serialization: AttributeError when attempting to get a value for field on serializer'User' object has no attribute 'image'django rest framework saving M2M relationSerializers - Django REST framework (AttributeError: Got AttributeError when attempting to get a value for field `user` on serializer)

Unexpected route on a flight from USA to Europe

12V lead acid charger with LM317 not charging

Is DC heating faster than AC heating?

The size of sheafification

Does this put me at risk for identity theft?

Do any languages mention the top limit of a range first?

NIntegrate doesn't work with NumericQ

Did Captain America make out with his niece?

How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?

Is it true that control+alt+delete only became a thing because IBM would not build Bill Gates a computer with a task manager button?

Why is Chromosome 1 called Chromosome 1?

Did WWII Japanese soldiers engage in cannibalism of their enemies?

is it possible to terraform a planet made of human excrement into habitable planet?

Does the Voyager team use a wrapper (Fortran(77?) to Python) to transmit current commands?

How would a family travel from Indiana to Texas in 1911?

How to approach protecting my code as a research assistant? Should I be worried in the first place?

Is it double speak?

I was contacted by a private bank overseas to get my inheritance

Secure my password from unsafe servers

What is an air conditioner compressor hard start kit and how does it work?

The heat content of the products is more than that of the reactant in an ............. reaction

How to check a file was encrypted (really & correctly)

How to help new students accept function notation

Is there such thing as a "3-dimensional surface?"



REST_framework Attribute


Attribute error when attempting to get a value for fieldDjango Rest Framework - Nested Serialization not working as expectedGetting attribute error when trying to access the nested serializer in Django Rest FrameworkAttribute Error after adding many=True in restframework django?Django AttributeError:'Campaign' object has no attribute 'ads'creating two models in one serializer of django rest frameworkDjango serialization: AttributeError when attempting to get a value for field on serializer'User' object has no attribute 'image'django rest framework saving M2M relationSerializers - Django REST framework (AttributeError: Got AttributeError when attempting to get a value for field `user` on serializer)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I got this error when attempting to get a value for the field scrumgoal_set on the serializer ScrumUserSerializer:




AttributeError at /api/scrumusers/




The serializer field might be named incorrectly and might not match any attribute or key on the ScrumUser instance.
The original exception text was:




'ScrumUser' object has no attribute 'scrumgoal_set'.




serializer.py



from .models import *
from rest_framework import serializers

class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['username','groups','password',]

class ScrumGoalSerializer(serializers.ModelSerializer):
class Meta:
model = ScrumyGoals
fields = ['goal_id','goal_name','goal_status']


class ScrumUserSerializer(serializers.ModelSerializer):
scrumgoal_set = ScrumGoalSerializer(many=True)
class Meta:
model = ScrumUser
fields = ['nickname', 'id','scrumgoal_set']

class ScrumProjectRoleSerializer(serializers.ModelSerializer):
# user = ScrumUserSerializer()
# scrumgoal_set = ScrumGoalSerializer(many=True)

class Meta:
model = ScrumProjectRole
fields = ('role', 'user', 'id')









share|improve this question


























  • can you show struct of ScrumUser

    – Ngoc Pham
    Mar 27 at 3:23

















2















I got this error when attempting to get a value for the field scrumgoal_set on the serializer ScrumUserSerializer:




AttributeError at /api/scrumusers/




The serializer field might be named incorrectly and might not match any attribute or key on the ScrumUser instance.
The original exception text was:




'ScrumUser' object has no attribute 'scrumgoal_set'.




serializer.py



from .models import *
from rest_framework import serializers

class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['username','groups','password',]

class ScrumGoalSerializer(serializers.ModelSerializer):
class Meta:
model = ScrumyGoals
fields = ['goal_id','goal_name','goal_status']


class ScrumUserSerializer(serializers.ModelSerializer):
scrumgoal_set = ScrumGoalSerializer(many=True)
class Meta:
model = ScrumUser
fields = ['nickname', 'id','scrumgoal_set']

class ScrumProjectRoleSerializer(serializers.ModelSerializer):
# user = ScrumUserSerializer()
# scrumgoal_set = ScrumGoalSerializer(many=True)

class Meta:
model = ScrumProjectRole
fields = ('role', 'user', 'id')









share|improve this question


























  • can you show struct of ScrumUser

    – Ngoc Pham
    Mar 27 at 3:23













2












2








2








I got this error when attempting to get a value for the field scrumgoal_set on the serializer ScrumUserSerializer:




AttributeError at /api/scrumusers/




The serializer field might be named incorrectly and might not match any attribute or key on the ScrumUser instance.
The original exception text was:




'ScrumUser' object has no attribute 'scrumgoal_set'.




serializer.py



from .models import *
from rest_framework import serializers

class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['username','groups','password',]

class ScrumGoalSerializer(serializers.ModelSerializer):
class Meta:
model = ScrumyGoals
fields = ['goal_id','goal_name','goal_status']


class ScrumUserSerializer(serializers.ModelSerializer):
scrumgoal_set = ScrumGoalSerializer(many=True)
class Meta:
model = ScrumUser
fields = ['nickname', 'id','scrumgoal_set']

class ScrumProjectRoleSerializer(serializers.ModelSerializer):
# user = ScrumUserSerializer()
# scrumgoal_set = ScrumGoalSerializer(many=True)

class Meta:
model = ScrumProjectRole
fields = ('role', 'user', 'id')









share|improve this question
















I got this error when attempting to get a value for the field scrumgoal_set on the serializer ScrumUserSerializer:




AttributeError at /api/scrumusers/




The serializer field might be named incorrectly and might not match any attribute or key on the ScrumUser instance.
The original exception text was:




'ScrumUser' object has no attribute 'scrumgoal_set'.




serializer.py



from .models import *
from rest_framework import serializers

class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['username','groups','password',]

class ScrumGoalSerializer(serializers.ModelSerializer):
class Meta:
model = ScrumyGoals
fields = ['goal_id','goal_name','goal_status']


class ScrumUserSerializer(serializers.ModelSerializer):
scrumgoal_set = ScrumGoalSerializer(many=True)
class Meta:
model = ScrumUser
fields = ['nickname', 'id','scrumgoal_set']

class ScrumProjectRoleSerializer(serializers.ModelSerializer):
# user = ScrumUserSerializer()
# scrumgoal_set = ScrumGoalSerializer(many=True)

class Meta:
model = ScrumProjectRole
fields = ('role', 'user', 'id')






python django django-rest-framework django-views






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 4:37









MarredCheese

4,0614 gold badges28 silver badges45 bronze badges




4,0614 gold badges28 silver badges45 bronze badges










asked Mar 27 at 3:01









Remiljw Remiljw

111 silver badge3 bronze badges




111 silver badge3 bronze badges















  • can you show struct of ScrumUser

    – Ngoc Pham
    Mar 27 at 3:23

















  • can you show struct of ScrumUser

    – Ngoc Pham
    Mar 27 at 3:23
















can you show struct of ScrumUser

– Ngoc Pham
Mar 27 at 3:23





can you show struct of ScrumUser

– Ngoc Pham
Mar 27 at 3:23












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369145%2frest-framework-attribute%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369145%2frest-framework-attribute%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해