text: from rest_framework import serializers
  from .models import Dish
  from django.contrib.auth.models import User
  
  class UserSerializer(serializers.ModelSerializer):
      password = serializers.CharField(write_only=True)
  
      class Meta:
          model = User
          fields = ('username', 'password')
  
      def create(self, validated_data):
          user = super(UserSerializer, self).create(validated_data)
          user.set_password(validated_data['password'])
          user.save()
          return user
  
  class DishSerializer(serializers.ModelSerializer):
      class Meta:
          model = Dish
          fields = ('name', 'description','price')