"""Serializers for account models"""
# pylint: disable=too-few-public-methods
from rest_framework import serializers
from accounts.models import User


class UserSerializer(serializers.ModelSerializer):
    """Serializer for Users"""

    class Meta:
        """Model and field definitions"""
        model = User
        fields = (
            'id',
            'username',
            'email',
            'website',
            'avatar',
            'steamid',
            'is_staff',
        )

"""Serializers for account models"""
# pylint: disable=too-few-public-methods
from rest_framework import serializers
from accounts.models import User


class UserSerializer(serializers.ModelSerializer):
    """Serializer for Users"""

    class Meta:
        """Model and field definitions"""

        model = User
        fields = (
            "id",
            "username",
            "email",
            "website",
            "avatar_url",
            "steamid",
            "is_staff",
        )

Change avatar to avatar_url in the user API
Change avatar to avatar_url in the user API

  """Serializers for account models"""
  # pylint: disable=too-few-public-methods
  from rest_framework import serializers
  from accounts.models import User
  
  
  class UserSerializer(serializers.ModelSerializer):
      """Serializer for Users"""
  
      class Meta:
          """Model and field definitions"""
+ 
          model = User
          fields = (
-             'id',
+             "id",
-             'username',
+             "username",
-             'email',
+             "email",
-             'website',
+             "website",
-             'avatar',
+             "avatar_url",
-             'steamid',
+             "steamid",
-             'is_staff',
+             "is_staff",
          )
  
Change avatar to avatar_url in the user API
## Code Before:
"""Serializers for account models"""
# pylint: disable=too-few-public-methods
from rest_framework import serializers
from accounts.models import User


class UserSerializer(serializers.ModelSerializer):
    """Serializer for Users"""

    class Meta:
        """Model and field definitions"""
        model = User
        fields = (
            'id',
            'username',
            'email',
            'website',
            'avatar',
            'steamid',
            'is_staff',
        )

## Instruction:
Change avatar to avatar_url in the user API
## Code After:
"""Serializers for account models"""
# pylint: disable=too-few-public-methods
from rest_framework import serializers
from accounts.models import User


class UserSerializer(serializers.ModelSerializer):
    """Serializer for Users"""

    class Meta:
        """Model and field definitions"""

        model = User
        fields = (
            "id",
            "username",
            "email",
            "website",
            "avatar_url",
            "steamid",
            "is_staff",
        )
