Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

wrong usage of serializer_class attr?#1015

Answeredbysliverc
jokiefer asked this question inQ&A
Discussion options

Hi folks,

I stumbled across the followingline and i'am not sure if this is the right way to figure out theserializer_class of the view, cause theModelViewSet gets his ownserializer_class by calling theget_serializer_class function.

Should this better rewrite to:

get_serializer_func=getattr(view,"get_serializer_class",None)ifget_serializer_func:serializer_class=get_serializer_func()else:serializer_class=None
You must be logged in to vote

This code bit was an invalid bug fix to allow the usage of the field nametype again. The JSON:API spec does not allow this though so this code block will be removed in next major version (seeTODO). See#993 for more details.

Replies: 1 comment

Comment options

This code bit was an invalid bug fix to allow the usage of the field nametype again. The JSON:API spec does not allow this though so this code block will be removed in next major version (seeTODO). See#993 for more details.

You must be logged in to vote
0 replies
Answer selected byjokiefer
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@jokiefer@sliverc

[8]ページ先頭

©2009-2025 Movatter.jp