from rest_framework import serializers
from .models import User



class UserSerializer(serializers.ModelSerializer):
    """ Usage:
        from rest_framework.renderers import JSONRenderer
        from semillas_backend.users.serializers import UserSerializer
 
        JSONRenderer().render(UserSerializer(user_instance).data)
    """
    class Meta:
        model = User 
        fields = ('id', 'name', 'picture')

from rest_framework import serializers
from .models import User



class UserSerializer(serializers.ModelSerializer):
    """ Usage:
        from rest_framework.renderers import JSONRenderer
        from semillas_backend.users.serializers import UserSerializer

        JSONRenderer().render(UserSerializer(user_instance).data)
    """
    class Meta:
        model = User
        fields = ('id', 'name', 'picture', 'location', 'email', 'username', 'last_login')

Add location, email, username and last_login to user serializer
Add location, email, username and last_login to user serializer

  from rest_framework import serializers
  from .models import User
  
  
  
  class UserSerializer(serializers.ModelSerializer):
      """ Usage:
          from rest_framework.renderers import JSONRenderer
          from semillas_backend.users.serializers import UserSerializer
-  
+ 
          JSONRenderer().render(UserSerializer(user_instance).data)
      """
      class Meta:
-         model = User 
+         model = User
-         fields = ('id', 'name', 'picture')
+         fields = ('id', 'name', 'picture', 'location', 'email', 'username', 'last_login')
  
Add location, email, username and last_login to user serializer
## Code Before:
from rest_framework import serializers
from .models import User



class UserSerializer(serializers.ModelSerializer):
    """ Usage:
        from rest_framework.renderers import JSONRenderer
        from semillas_backend.users.serializers import UserSerializer
 
        JSONRenderer().render(UserSerializer(user_instance).data)
    """
    class Meta:
        model = User 
        fields = ('id', 'name', 'picture')

## Instruction:
Add location, email, username and last_login to user serializer
## Code After:
from rest_framework import serializers
from .models import User



class UserSerializer(serializers.ModelSerializer):
    """ Usage:
        from rest_framework.renderers import JSONRenderer
        from semillas_backend.users.serializers import UserSerializer

        JSONRenderer().render(UserSerializer(user_instance).data)
    """
    class Meta:
        model = User
        fields = ('id', 'name', 'picture', 'location', 'email', 'username', 'last_login')
