mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-11 12:17:37 +03:00
Merge pull request #3055 from Andrew-Chen-Wang/patch-6
This commit is contained in:
commit
d4bc89bcbe
|
@ -7,7 +7,7 @@ User = get_user_model()
|
|||
class UserSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = User
|
||||
fields = ["username", "email", "name", "url"]
|
||||
fields = ["username", "name", "url"]
|
||||
|
||||
extra_kwargs = {
|
||||
"url": {"view_name": "api:user-detail", "lookup_field": "username"}
|
||||
|
|
|
@ -28,7 +28,6 @@ class TestUserViewSet:
|
|||
|
||||
assert response.data == {
|
||||
"username": user.username,
|
||||
"email": user.email,
|
||||
"name": user.name,
|
||||
"url": f"http://testserver/api/users/{user.username}/",
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user