mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-26 19:44:00 +03:00
Remove email from User API
This commit is contained in:
parent
0d5e9132f7
commit
17499a12c9
|
@ -7,7 +7,7 @@ User = get_user_model()
|
||||||
class UserSerializer(serializers.ModelSerializer):
|
class UserSerializer(serializers.ModelSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = User
|
model = User
|
||||||
fields = ["username", "email", "name", "url"]
|
fields = ["username", "name", "url"]
|
||||||
|
|
||||||
extra_kwargs = {
|
extra_kwargs = {
|
||||||
"url": {"view_name": "api:user-detail", "lookup_field": "username"}
|
"url": {"view_name": "api:user-detail", "lookup_field": "username"}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user