Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What is going on with this article?
@nakamumu

Django rest framework decorators `action decorator replaces list_route and detail_route`

More than 1 year has passed since last update.

背景

Django1.11.1のサポートが4月とかで切れるので、Django2.2にupdateを行っている。
Djangoのアップデートに伴って、restframeworkのバージョンも 3.6.3 から 3.8.2 にアップ。
するとPyCharmのapi.pyにこんな横棒が。

from rest_framework.decorators import detail_route, list_route

しかしroutingは正常に行えている。

確認

以下のページでアナウンスされていた。
https://www.django-rest-framework.org/community/3.8-announcement/

Both list_route and detail_route are now pending deprecation. 
They will be deprecated in 3.9 and removed entirely in 3.10.

なるほど、バージョン3.8.2ではまだ完全には廃止されていない。

0
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
nakamumu

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
0
Help us understand the problem. What is going on with this article?