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;
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
add a comment |
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
can you show struct ofScrumUser
– Ngoc Pham
Mar 27 at 3:23
add a comment |
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
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
python django django-rest-framework django-views
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 ofScrumUser
– Ngoc Pham
Mar 27 at 3:23
add a comment |
can you show struct ofScrumUser
– 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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
can you show struct of
ScrumUser– Ngoc Pham
Mar 27 at 3:23