【发布时间】:2018-05-11 10:28:31
【问题描述】:
我正在使用 Django rest auth 进行用户帐户处理。为了更新用户信息,我创建了自定义端点,所以我不需要 djnago-rest-auth 生成的端点 /rest-auth/user/ (GET, PUT, PATCH)。如何删除这些端点?
urls.py
urlpatterns = [
path('', include("rest_auth.urls"), name="user-auth"),
path('register', include('rest_auth.registration.urls'), name="user-auth-registration"),
path('<uid>/', views.UserProfileView.as_view(), name="user-profile"),
]
编辑
我想使用所有其他的 rest-auth url,如登录、注册等。但我只是不想要 /rest-auth/user/ 描述的 here。
【问题讨论】:
-
提供你的 urls.py
-
@SardorbekImomaliev 添加了
标签: django django-rest-framework django-rest-auth